Butter a 9-inch square baking pan.
In a large pot, melt the butter, over medium heat, until it starts to foam; about 3 minutes.
Reduce heat to low and continue to cook, stirring constantly with a silicone spatula, until the bubbling stops and the little specks of milk solids begin to turn golden; another 2 to 3 minutes.
Watch carefully at this stage; you want the milk solids to go from golden to a medium-dark brown, but not black.
Immediately turn off the heat and add the marshmallows and salt to the pot to stop the butter from cooking any further.
Stir to coat all the marshmallows in the hot, browned butter until they’re well coated and begin to soften; about 1 minute.
Return heat to low and stir until the marshmallows are almost smooth, some small lumps are fine; 1 to 2 minutes more.
Be patient at this stage; you want the marshmallows to melt evenly and gently, softening all the way through without reaching a boil; If too much heat is applied, the sugars can caramelize which will render harder Rice Krispies treats; turn off the heat.
Stir in the vanilla; add the cereal and, using a large silicone spatula, fold the mixture until all the cereal is coated.
Pour into the prepared baking pan.
Using the spatula, gently push and pull the cereal to spread out to fill the pan; for the most delicate, fluffiest treats, avoid pressing down, as they should not be packed in.
While still warm, top the treats with rainbow sprinkles and a very light sprinkle of flaky salt, if using.
Let cool for at least 30 minutes to set before cutting.
Once cool, remove from the pan and transfer to a cutting board.
Using a serrated knife, cut it into a 4 x 4 grid to get 16 squares.
Treats keep best for up to 5 days if stored in an airtight container at room temperature.