There are worldwide shortages of many drugs.
However, the UK is now in a particularly vulnerable position. The EU drug wholesalers keep stocks distributed around the EU, since it makes supply more responsive. However, they stopped keeping any stock in the UK following brexit for many reasons. As we're not in the EU and free movement of drugs between EU and UK stopped, they could no longer balance stocks in distributed warehouses between UK and EU. The government even talked about forbidding the export of drugs in short supply, the effect of which was to stop those drugs ever being stored in the UK in the first place. Apparently there's also some tax to pay on the transfers now, which wasn't the case before brexit.
The NHS is probably the largest single purchaser of drugs in the world. This means it negotiates the lowest prices (excluding concessions for 3rd world countries). This works well when there's enough supply, but when there isn't, the stock which is available goes to the highest bidder, which is usually not the NHS.
The EU is rolling out a legal framework to maintain their distributed stocks, effectively making it a legal requirement to maintain stocks in the EU for EU countries. Not being part of the EU, this is making it even more difficult for the UK to obtain some stocks.
I was at a urology conference in Paris for last several days and spoke with probably all the major drug manufacturers. What was very clear to me was how many of their UK people have now moved to the EU to continue working for these companies. I heard several of their EU staff saying they used to come over the the UK as often as once a week to work with their UK staff, but it's too much hassle now due to brexit and they don't bother any more. I got the impression their UK staff who wanted to remain key in their companies seem to have all moved to the EU. As many of you know, we used to be the main player in drug development in the EU, but it's remarkable how suddenly that changed.