Preheat the oven to 350 degrees F (180 degrees C).
In the meantime, grate the cheese and slice the potatoes into ⅛-inch (3 mm) slices. (You can use a mandolin or a sharp chef’s knife to slice the potatoes.)
Melt the butter in a small saucepan over medium-low heat. Then, stir in the flour and whisk constantly for about 60 seconds to prevent lumps. Stir in milk while continuing to whisk, and then season with garlic powder, onion powder, and salt.
Lower the heat to low and simmer until smooth for about 1-2 minutes, without letting it come to a boil. Add 1 cup (100g) of the shredded cheese and stir until it is melted and smooth. Remove the saucepan from the heat.
Grease an 8x8-inch (20x20 cm)** casserole or baking dish with oil spray or butter. Arrange half of the potato slices in a single layer (it doesn’t have to be perfect, but make sure it is even on all sides) and then pour half of the cheese sauce on top. Repeat with a second layer of potato slices and cheese sauce. Top with the remaining shredded cheese and sprinkle with paprika for a pop of color.
Cover with aluminum foil and bake for about 40-45 minutes, then uncover and bake for another 40-45 minutes*** or until the potatoes are fork tender and the cheese is golden brown on top. Let the potatoes rest for 5-10 minutes before serving.