eaf The use of 5 volts is a bit challenging as well, however
If you have 12V available, just use a buck converter. There are even buck converters that have USB connectors for output, like this one:
https://www.amazon.com/gp/product/B07SS6XTZY
This is a typical buck converter, if you want to construct your own:
https://www.amazon.com/gp/product/B08JZ5FVLC
If you prefer linear regulators to switching regulators, just use a 7805 three terminal chip.
Chen