Leaflet library is free but the mapbox data/tiles you access with it are not (once you go over 200k tiles)

As I understand it OSM is free but it is not a map but a complex database that a map can be drawn from

Third party companies like mapbox take that free data, render the map, host the service and then not unreasonably charge by the tile as they have servers to run etc