GDPR applies to any company that offers services to EU residents. It doesn’t matter if the company has any presence in the EU.
Now, that means EU may not necessarily be able to force the company operating in a different country to pay up but if a company has any significant EU customer base, I assume they will play ball.