How can I restore macOS on a MacBook if all the data on the hard drive is wiped/corrupted? I want to be secure against a worst-case scenario because I'm about to start tinkering with my SSD (going to try installing Linux). What backup methods would allow me to perform a clean reinstall (I'm not interested in keeping files, just a working macOS system) of macOS if I were to destroy all the data on the hard drive? Based on research on the web, it seems that a bootable USB would do the trick, but all methods seem to rely on the cmd+R recovery mode combination, and I assume that that requires a hard drive that will at least start up.
So, first of all you need at least a 16 GB USB Drive.  Formatted as Mac OS Extended (use disk utility). And you need to open up the Mac App Store and download the macOS Mojave (or any version supported by your Mac) Installer.

Then follow this guide: https://support.apple.com/en-us/HT201372

After that you can eject your USB Drive.

Then when you need to reinstall macOS you shutdown your computer. Then hold down the option key then press the power button while holding down the option key until you see a boot picker. Then insert your USB Drive you created above. Use the arrow keys to select it then press enter. Then click disk utility and select your internal ssd and click erase. Then quit disk utility and click install macOS and follow the guide there.

Now your on your way to a working macOS install. Enjoy!