Printer head hits walls

This happened to me when I printed a Makerworld thing. Couldn’t be bothered to figure out how to prevent it so have not used Makerworld since. Also, it blew out all of my filament profiles which I found annoying.