“Bomb” in the question seems to be a very vague term for a wide variety of ordnance.
There have been shortages of specific types of artillery ammunition, like the common 155mm, which has been a major concern. These need to be factory made, you can’t just cobble together something like a 155mm. On the Russian side, they’ve similarly been having problems supplying 122mm and 152mm rounds to the field.
In both cases, each side has dug into both existing stockpiles and reached out to allies to supply ammunition. Both sides have had decades of Cold War era Soviet ammunition to fall back on, though Ukraine has to rely more on the west to feed the western calibers. Those stockpiles were massive, but specific types of ammunition have been depleted or run low leading to the shortages in the field. This artillery attrition is one of the most important parts of the war.
When it comes to smaller explosives, like what is being dropped or delivered in FPV drones, those can be cannibalized from existing ordnance. Landmines, artillery projectiles, or aircraft dropped bombs can be opened up and their main charges used to make the smaller ones delivered by small drones. Since the amount used per drone in this way is so small and can be cobbled together, the supplies can really stretch. I haven’t seen mass examples of improvised explosives in the war used for this, but ammonium nitrate-aluminum dry mixed explosives are very easy and fast to make. The downside being that they often need a small amount of military explosive main charge as an intermediate charge to reliably detonate, and the net explosive power of these explosives is lesser. With a small drone payload you want to maximize the charge, so this kind of filler doesn’t make the most sense there. If these pop up I’d expect to see them in defensive emplaced explosives or bulk anti-vehicle mines. These are the sorts of explosives used in things like Iraqi IRAMs and Syrian “Hellcannons” but I haven’t seen any evidence in Ukraine of either side resorting to that.
You’re also seeing PG HEAT warheads being repurposed. Again a lot of those are from mass Cold War era stockpiles, and cannibalizing the warhead from something meant for an RPG-7 into a drone munition is a better use of it so, there’s plenty of that.
On the side of long range drones like the Geran-2 (Russias Shahed clone), they are using a variety of warheads filled with common military explosives like TNT and RDX based mixtures. Creating the actual main filler is not a problem for dedicated factory. While exact numbers and totals are a bit opaque, a bit of tablecloth math suggests Russia produced about 9,500 metric tons of RDX in 2024 domestically.. Russia claims to have expanded a facility to provide about 6,000 more metric tons per year which should be operational as I type according to their public release, but fog of war on that.
Writ large, that has to be split between all of the ordnance that needs it as filler (if 9,500 tons all went into 152mm shells it would fill about 2 million), but for relatively small payloads it will keep them going.