SMPS come in many types.
DC to DC: example 24V to 5volt.
AC to DC: 110/220 to 5V
(many more types)
ZVS: zero voltage switching (could be done at the 50/60hz power line frequency) BUT Every one that I have made switches at a much higher frequency. 100khz to 2mhz. This is complicated; through inductors and capacitors, a situation is set up where the MOSFET or transistor is turned off (or on) when there is no voltage across the part. This is complicated and not what you should do for your first power supply.
Building a 'power line' SMPS as you first is very dangerous. Things can go wrong very fast. If you want to learn, I think you should get a 220 to 12 volt transformer, add a fuse, and then build a DC to DC SMPS. Getting off the power line may save your life. Keeping the voltage below 50 volts is much safer.