If you don't do it right, you get a HTTP 429 error with the message "too many requests".
If you read about the policies, you can download tiles, but you'll find that
This is old as hell but I do recommend a web-based solution.
This code runs in your browser and does never send your data anywhere else. Everything remains local on your machine.
How do I know? I built it specifically for that purpose.