Where BioNTech had specialist competence in a technology which turned out to somewhat effective against the problem and Pfizer had massive funds, established contact network including decision makers and established ability to quickly run large clinical trials.
Neither of all that much use without the other. Taken together, an opportunity to conduct highly profitable business, mitigate a health emergency, and look great doing it.
There seems to be lessons about conditions for successful cooperation in the example, but I'm not so sure what they say is particularly encouraging about uniting nations.
The cooperation happened when both parties could only benefit through cooperation, and it required trust. The vaccines were snatched (in the beginning) and the Trump wanted to "take over" BioNTech to guarantee vaccine priority.
COVID-19 showed that everyone is on its own (countries, cities, individuals, etc..)