That is a setting that is specific to each app that you use.
Turn off in Safari: Edit menu / Spelling and Grammar / then un-check "Check Spelling While Typing
That will turn off spell checking in Safari, and you will need to do that for each app that you use for entering text.
There IS a way to do that system-wide, so if you want to prevent spell-checking everywhere, you will want to search for "disable macOS spell-checking in the terminal", but you may find out that you don't encounter "annoying" spell-checking too much outside of your browsers. Some word processors use their own internal settings for spell-checking, such as Microsoft Word, which doesn't use your Mac's system spell-checking at all. That's all in Word's settings, and doesn't affect other parts of the system at all.