First thing’s first, you need to caramelize the onions. Add butter, onion, sugar, and salt to a skillet (I am using a cast-iron skillet) and sauté over medium heat, stirring occasionally.
Cook for 20-30 minutes, or until the onions are caramelized. Stir a few times along the way to ensure even cooking and avoid burnt bits. Add more butter or oil if needed. Set caramelized onions aside.
Add potatoes to a large pot and add just enough water to cover the potatoes. Add salt and bring the water to a boil over medium-high heat. Cook until potatoes are fork-tender.
Drain the potatoes and return them back to the pot. Using a potato masher, begin mashing. Add milk, butter, salt, and pepper, then mix using a hand mixer.