take pan, ideally a wider, high-walled pan.
add pasta (as desired, any amount is fine)
add water so that all noodles are just covered
salt *lightly,* as all the salt will end up in the finished dish
bring barely to a boil while stirring regularly, then turn to low/medium-low
i prefer to put a lid on the pan to keep steam in
now wait! (depends on the pasta) until pasta is cooked on the outside, but still undercooked inside. not al dente, but actually undercooked.
uncover pasta, turn up heat slightly
you'll learn the timing after a couple tries, but the pasta should be cooked right as the water has cooked down into a glossy rue that sticks to the noodles
this works for box mac n cheese, and produces an extremely good result.
it's forgiving, so just test the pasta, watch the thickness of the water and the doneness of the pasta, and play with the heat to get them synced up.
to make a cacio e pepe type of thing, i take it off the heat, let it cool down a bit, and slowly add a 1 to 3 cups of finely grated parmesan while stirring, it should emulsify with the cooked down water and become a very smooth sauce, if it clumps, it's probably either too hot, there's not enough water, or there's too much cheese.