There are two very different things here the bombs (also called carcass) talked about in the American national anthem are fired from mortars (artillery with high trajectories of fire employed in the indirect role).
These mortars were much larger than the modern mortar often being employed on ships named bomb ketches or on land during siege warfare.
The projectiles that they fired had early fuses and ideally they would explode over the target setting fires.
On the other hand cannonballs fired from a cannon (long barrelled direct fire) were mostly solid shot, in the early days of gunpowder weapons that meant stone but as time went on it became iron.
Other than solid shot artillery had available to them canister shot from very early on, canister shot is tin of metal balls. In effect turning the artillery price into a large shotgun, this limited the range of the shot to no more than 300m.
Developed latter than canister shot was shrapnel, invented by Lieutenant Shrapnel with early versions in 1784 but only adopted by the British army in 1803 the height of the napoleonic war. Shrapnel combined a time fuze with canister shot ideally allowing it to explode over or in front of its desired targets.
Estimates were made at Lutzen where it was found that around 1/3 of French shells from howitzers failed to explode, still more will have failed to explode at the correct time causing minimal damage.
TLDR: Yes, but only specific shells that were designed to, the majority of ordinance fired did not. During the napoleonic/revolutionary war period fuses were not yet advanced enough to be completely reliable.