No smartphone is immune to software issues, even one as advanced as the Galaxy S9 and S9+. Bugs can be caused by a multitude of issues, such as third-party apps that just refuse to play well with your device's OS. Thankfully, there's a simple way for you to check if your S9's bugs are due to uncooperative apps.
Like almost all Android devices, the S9 and s9+ can be booted into safe mode, which gives you the ability to troubleshoot your device for issues like random reboots, crashes, overheating, and more. Safe mode disables all third-party applications, so if bugs or other issues disappear while in this mode, you'll know definitively that one of the apps you've installed is the culprit.
To boot your S9 or S9+ into Safe mode, start by pressing and holding the power button until the power menu appears on your screen. From there, long press the "Power Off" button until it turns into a "Safe Mode" button. Simply tap on "Safe Mode" once it appears and your device will automatically reboot to safe mode.
Now that your device is in safe mode, you'll notice a "Safe Mode" badge on the lower-left corner of the screen. You'll also notice that all third-party apps have been grayed out to denote their disabled status. At this point, you can do your troubleshooting, and if you can pin down the problematic app, you can uninstall it from Settings –> Apps.
Once you're done troubleshooting your device, you're free to exit out of safe mode. To do so, simply press and hold the power button until the power menu appears, then tap on "Restart." When your S9 finishes rebooting, you'll be out of safe mode — simple as that!