Summing up from my point of view ...
AZ made a mess of drawing up their contracts, clearly underestimating the teething problems they'd have with manufacture. By the time they had the teething problems with their UK facilities (causing them to have to use their EU facilities to supply the UK in December) they'd already signed their EU contract - so they probably in secret saw this coming this month. Whether they could have done anything to address it before it all blew up, possibly not, given the process of growing/producing the vaccines.
EU were slow to sign contracts, because they spent too long haggling over prices, but individual states signed up to central procurement & distribution - apart from Hungary, who've opted for Russian and now Chinese vaccines instead. France Germany Italy actually wanted to go the independent route but were persuaded in the interests of the poorer states within the EU to agree to join the joint centralised programme. They may have some tinge of regret that they decided to support this route, but in the end there is little point in having everyone vaccinated in a few EU countries and the rest all scrabbling around trying to source and pay for vaccines. It's a global pandemic and requires a global cooperative response, not any form of vaccine nationalism. And someone needs to remember the need to vaccinate the rest of the world, sooner rather than later, to try to prevent yet more variants emerging.
A contract is a contract, regardless of whether one was signed before the other. One contract does not have legal precedence over another where there is a conflict between the two. That works both ways too (so the UK govt would be on equally shaky ground to demand that AZ only supplied UK). Ultimately this was AZ overpromising and underdelivering. (Incidentally, re a comment somewhere above, remember they are part Swedish, so have a foot in the EU camp). This then becomes a commercial contractual dispute between AZ & EU, and the UK govt could have kept out of it until the EU Commission's stupid suggestion that they could use Art 16 of the NI Protocol. Fortunately everyone else across the whole of Europe recognised the stupidity of that suggestion. (Again, as pointed out above, Johnson has not been slow to threaten the same measure, and indeed there was the little matter of the Single Market Bill).
At least now with more vaccine options coming on stream we might avoid such unseemly disputes in the future.