In addition to the links others have given I'd note that serving dynamically generated Mapbox Vector Tiles (MVT) can be done very easily from a very standard postgis server these days [0]. For me this is the no brainer way to go. Your main problem is likely to be converting from OSM's labyrinthine data structure to something easier to serve.
[0] For the explanation and minmal version see https://www.youtube.com/watch?v=t8eVmNwqh7M source code here https://github.com/pramsey/minimal-mvt. For a full fledged package see https://github.com/maplibre/martin or https://github.com/CrunchyData/pg_tileserv