Turn off text replacement on macOS

To disable this globally on your Mac, you'll use need to use the defaults command(see here for more info). This command only applies to your macOS. Open the terminal(see here if you don't know how to open terminal) and type:

defaults write -g WebAutomaticTextReplacementEnabled -bool false

and to enable it again, you can just switch the last word to true and type the whole thing in the terminal again:

defaults write -g WebAutomaticTextReplacementEnabled -bool true

You can also disable text replacement on an app-by-app basis by having the app open(let's say Safari), then up in the menu clicking the Edit > Substitutions then unchecking Text Replacement.

More information found in this article.