Why is replit lagging and crashing?
This happens because there are soo many lines in your code, that by the time it loads, replit raises an error saying "we are having trouble". To fix, this, either buy a hacker plan for more storage/speed or divide your code into multiple files so that they have different loading times preventing crashes.
It's most likely due to a lack of processing power in repl's servers as they have to allocate that power to hundreds of different repls. My recommendation would be to use a local IDE which will use your CPU and will avoid internet-related issues.