Buy a
buck converter module.
Or build your own using e.g. a
LM2596HV. Sample circuits are in the datasheet.
Note that a switch mode converter, although seemingly simple with modern integrated circuits, can be difficult to get to operate satisfactorily due to the high peak currents during switching and the resulting EMC problems. Using an off the shelf module means others have solved these issues for you.