What the TLD actually signals
Country-code TLDs carry a geographic signal that you cannot turn off: .de tells Google the site is for Germany, and that targeting applies whether or not you want it. Generic TLDs carry no such signal, which is why every multi-market business ends up on one.
The complication is a category Google calls generic ccTLDs: technically country codes, but used so widely outside their country that Google treats them as generic. .io (British Indian Ocean Territory), .co (Colombia), .ai (Anguilla) and .me (Montenegro) are the common ones. If you are on one of these, you are effectively on a gTLD — but the list is Google's and it changes, so it is worth confirming rather than assuming.