Yes,that is what it actually does,indeed.Its supposed to be a switch mode regulator with voltage feedback from its output to ensure the voltage does not go higher than what it was designed for...
They ensure the voltage doesn't go higher than what it design for,but,from your acquaintance with those kind LM2596S modules(that have the same components as in my photo:coil,chip,trimpot,4 capacitors,2 resistors,diode and led),does it valid also on the startup moments?or an inrush current will flow out of the module,at startup moments,forward to the connected device?
If yes,is there a need to connect in the output of the module a tvs diode or a varistor to prevent that?as i don't think that there is a place on the finished item to add the capacitor and the resistors,as LadySpark has suggested.