We place constraints on the normalised energy density in gravitational waves from first-order strong phase transitions and then from the formation of primordial black holes using data from Advanced LIGO and Virgo's first, second and third observing runs. First, adopting a broken power law model, we place 95 % confidence level upper limits simultaneously on the gravitational-wave energy density at 25 Hz from unresolved compact binary mergers and strong first-order phase transitions. We then consider two more complex phenomenological models, limiting at 25 Hz the gravitational-wave background due to bubble collisions and the background due to sound waves at 95 % confidence level for phase transitions occurring at temperatures above 1e8 GeV. We then do a similar search assuming a background sourced by the formation of primordial black holes and unresolved compact binary mergers. For a very generic spectrum describing the primordial black hole background, we place 95% confidence level upper limits on the gravitational-wave energy density at 25 Hz.