I think there are two answers to this.

First, I think the "incentive" would be "not getting kicked out of trading blocks and having punitive tariffs". Large countries can impose their will on smaller ones to an extent. In the extreme, larger and more powerful countries can invade smaller ones. The G7 countries won't be invading Switzerland, but they do have a lot of levers to make it very difficult for Swiss companies to do business. I don't think anything that rises to the level of a blockade is likely, but larger and more powerful countries have levers to use against smaller ones.

Again, I think the most likely result would be things like tariffs and restrictions on businesses, but there are so many options available to large, powerful countries to just make things annoying.

Heck, we've seen some of this with Brexit. British people are annoyed that they have to pay for a visa to enter the Schengen Area. That's a relatively small annoyance. Countries can ban foreigners from certain other countries. Countries control their airspace and Switzerland is land and air-locked by the EU.

Again, I don't think things will be extreme like that, but it's not hard to imagine all sorts of ways one can be incentivized to join an agreement at the point of a gun.

Second, I think the point is that it doesn't require those countries to join the agreement. Let's say that a company makes $10B in profit and it's accounted for as $1B in the US and $9B in a tax haven. They pay 25% on the $1B which is 2.5% of their global profits. The US then says, "under the law, you now owe an additional $1.25B since you didn't hit the 15% minimum."

The whole problem around tax havens is that companies are accounting for their profits in tax havens while their operations are actually in other countries. The company is actually doing their business and running their operations in the US, France, Japan, etc., but claiming that a company in a tax haven is the one actually making the profits. That also means that it's relatively easy to target them.

If you're a tech company whose employees are in the US and EU and whose sales are in the US and EU, but you're funneling the profits through a tax haven, it's still pretty easy for the US and EU to force you to give them money.

Company: "No, we didn't make any money in your jurisdiction! Better luck next year!"

US/EU: "Watch while we raid your offices, prevent your employees from working, shut down your data centers, prevent our financial institutions from being allowed to do business with you (which means you can't pay workers and can't collect money from advertisers/users/etc.), etc."

Company: "Well, when you put it that way..."

I mean, it'd still end up in court, but it's not as if the tax haven needs to join the agreement for the G7 countries to enforce a minimum tax on multinational companies. If the companies are actually doing business in G7 countries, their money/assets/etc. is in those countries to be confiscated. "Hey, you're pretending that you're earning that money in a tax haven and not here, but I'm willing to bet that cutting you off here will have a huge impact on those profits..."

Right now, companies are saying, "we didn't earn that money in your country so you can't do anything" and this agreement is kinda about, "it doesn't matter; if you haven't paid 15% of your global profits in tax, we're going to take that money from you even if you claim it was earned somewhere else."