Autocomplete in Chrome Browser, not sure if its Mac OS or Chrome
This is called &quot;Text Replacements&quot; and it's a function/feature of macOS.
This feature will work on any app that uses the Cocoa interface; so apps that use it like all native Apple Apps and 3rd party apps like Chrome will be able to use this functionality.  Apps that don't use Cocoa like Microsoft Word or Firefox won't be able to use Text Replacements.
To remove it (stop it from happening), open System Preferences → Keyboard → Text and remove the entry for &quot;th&quot;. I just tried adding it, and it behaved exactly as you described. It even tried to intercept it as I typed it here until I removed the entry.