https://gdpr.eu/article-3-requirements-of-handling-personal-...
2. This Regulation applies to the processing of personal data of data subjects who are in the Union by a controller or processor not established in the Union, where the processing activities are related to:
a. the offering of goods or services, irrespective of whether a payment of the data subject is required, to such data subjects in the Union; or
b. the monitoring of their behaviour as far as their behaviour takes place within the Union.
3. This Regulation applies to the processing of personal data by a controller not established in the Union, but in a place where Member State law applies by virtue of public international law.
How this is enforced this is a different question, but the GDPR explicitly spells out that the controller or processor, even if not established in the EU, is subject to GDPR if they are interacting with EU citizens.