BEIJING—China’s hard-charging technology sector, which has produced some of the world’s hottest public companies and unicorn startups, is experiencing something different: a slowdown.

An economic deceleration amid the trade fight with the U.S. is causing layoffs, reducing bonuses and shrinking the easy venture funding that fueled China’s thriving startup scene.

While...