A swarm of bees ( was ) hovering over the flowers.
The word 'swarm' is a collective noun & hence the singular form (was) should be used. It would have been 'were' if the word was 'swarms' as it indicates many swarms of bees together.
_____
Hope it helps ⚜