> OSM Database -> PNGs
This is a tile rendering farm. It takes a lot of compute power and has to be redone every time a style changes or data changes.
> OSM Database -> Vector Tiles
This is a relatively cheap data extraction process. It has to be redone when data changes.
> PNGs -> Your screen
This is extremely simple.
> Vector Tiles -> Your Screen
This is pretty complex and hard to do fast. Mapbox GL JS is the leader here and they have put a lot of resources into doing it well and fast. Maplibre GL JS is the fork, which is decent, and there are also Leaflet and OpenLayers options.
Source: This is basically my life for the last 10 years.