You are waayyy too optimisitc. The EU and really much of the rest of the world has barely done jack shit since the beginning of the Israel-US-Iran war. If Trump was a bit more diplomatic instead of being an orange toddler, the EU would probably not even begin the derisking process from the US.
The EU/Europe would simply be content by sitting idly by as the war raged on.
If they actually cared about "human rights" and "international law" that they always peddled, they would have heavily sanctioned the US and put in embargoes, started anti-US petitions/motions in the ICC, UN, and other international bodies etc...
If America uses nuclear weapons, it won’t be just about principles, but survival and self preservation that will drive EU actions.
America crossing the nuclear threshold in Iran when the conventional war isn’t going its way sets an unacceptable precedent as far as the EU is concerned given the clear and present danger of the Russians deciding to follow suit in Ukraine.
America throwing nukes around also massively increases the risks that others will throw nukes back, and while CONUS might be too far for Iran at present, massive America military bases and large troop concentrations in Europe are not.
Already the alliances America built up over decades is fracturing under the strain of America stupidity. The actual use of nuclear weapons will shatter it.
There will be some small, deluded powers who will still cling to America, but the bigger ones with actual options and a semblance of autonomy left will immediately seek to jump ship.
Something else to consider is that a certain other superpower may well choose to go on the offensive should America cross such an unambiguous red line.
China making a principled stand against America using nuclear weapons with a total and absolute trade embargo backed up by full arsenal of trade enforcement mechanisms established since the Trump Trade War ill have real and sharp teeth, and will likely push many wavering fence sitters into falling in line for fear of suffering secondary trade sanctions themselves.
Indeed, such an egregious crossing of the world’s moral red lines could well be the perfect pretext for China to really bring the full might of its trade and economic weapons to bear against hosts of American military bases in its region.
The message is clear, remove those American bases and forces, or suffer a total trade ban with China and anyone using Chinese components anywhere in its supply chain. If that doesn’t work, China has absolute escalation dominance to go full kinetic.
Which it may well have to do, as another obvious consequence of America using nukes for real would be a mad rush by many middling powers towards nuclear weapons themselves. Japan is already leaning hard in that direction with obvious hints from Washington. And it will probably take something on the scale of China going full invasion and occupation of the Japanese home islands to force all the others thinking about nuclear breakout to give up on that dream.
Such a course of events where America shatters the current world order with its own arrogance and stupidity and China forging a new one through the demonstration of its own superior military power is one of the few scenarios where the incumbent dominant power could be utterly usurped by a rising new power without a full scale direct war between them.