Technology companies thrived when the pandemic began more than two years ago. But now, as much of the population returns to work and spends less time at home, the tech sector is suffering deep losses as investors fear that companies boosted by the pandemic are running out of steam.

The tech-heavy Nasdaq composite reported the biggest dip, closing on Monday down more than 4% after ending April with its worst monthly performance since the 2008 financial crisis. It rose 0.