Preheat your oven to 375°F so it reaches temperature while you prepare the filling. Dice the yellow onions into ½-inch pieces and measure out your mashed potatoes—having everything ready before you start cooking ensures a seamless workflow and prevents overcooking the beef.
Heat a large skillet over medium-high heat and add the ground beef, breaking it apart with a spoon as it cooks. After about 3-4 minutes, once the beef has released its fat and begun to brown, add the diced onions. Continue cooking for another 3-5 minutes, stirring occasionally, until the beef is fully cooked through and the onions are softened and slightly translucent. I like to let the beef develop a nice golden color before adding the sauce—this builds flavor through browning and makes the filling more flavorful.
Remove the skillet from heat and stir in the marinara sauce and salt, mixing until the sauce is evenly distributed throughout the meat and onions. The residual heat will warm the sauce without breaking down its flavor. Taste and adjust seasoning if needed—this is your last chance to balance the flavors before assembly.
Transfer the meat and sauce mixture to a 9x13 inch baking dish, spreading it into an even layer. Spoon the mashed potatoes over the top, using the back of a spatula to gently spread them in an even layer—you want good coverage but don't compress the potatoes too much, as this helps them get crispy on top. I find that leaving the potato layer slightly rustic rather than perfectly smooth creates better texture and browning.
Bake in the preheated 375°F oven for 25 minutes, until the potato topping is golden brown and the filling is bubbling slightly around the edges. The top should have a nice golden color that indicates it's crispy on the outside while the interior stays creamy.
Remove the pie from the oven and let it rest for 5-10 minutes before serving. This resting period allows the filling to set slightly, making it easier to scoop and serve while still maintaining a creamy interior.