[Question] Downloading raster data of street maps for offline usage

I am working on an offline desktop application which uses the Leaflet library for loading the mbtiles (raster format, not vector) and display the map.
My application and need is for a detailed street map upto zoom level of 18. I aim to download data for a couple of countries and I have read online that I cannot download huge amounts of data because it will overload the server.
I want to know if there is a way to get the street maps raster data for a country in the mbtiles format, some way where I could pay or something where I can get the required data without it being illegal or causing a problem on the server.

Raster tiles consume huge amounts of space. Your approach is not practical at z18. The most you can hope for is a couple of county size units at zoom 17. The servers do not render these tiles except on request, so any attempt to cover a whole country at z18 will likely get you blocked.

Instead look at ways you can do the same thing with a vector format (either with leaflet or something like MapsForge)

Maybe see https://wiki.openstreetmap.org/wiki/Vector_tiles for alternative solutions?