https://fortune.com/2019/02/05/pfizer-pneumonia-vaccine-trea...
To not be glib: first, Prevnar is an outlier (https://www.fiercepharma.com/special-report/5-prevnar-13) and lack of profitability in basic vaccines is a public health problem in terms of investment in R&D and producer concentration https://magazine.jhsph.edu/2002/fall/vaccines.html (dated link but still accurate). They aren't like normal pharma in terms of their margins and R&D profile. You develops something for macular degeneration and it's a one off that can be depreciated. Influenza and some others require international monitoring, forecasting, sample collection and new work every season. It's closer to biologics or genetic therapies in terms of cost of revenue, but priced nowhere near that because of the economies of scale and, frankly, social responsibility of the producers.
And the global vaccine market is work $32B right now, so there is obviously a lot of profit being made.[1]
[1]https://www.prnewswire.com/news-releases/vaccine-market-size...
You're mixing market cap with annual sales. Twitter's revenue was $2.61B last year.