President Donald Trump secured a sweeping shift in U.S. domestic policy as the House passed a $3.4 trillion fiscal package that cuts taxes, curtails spending on safety-net programs and reverses much of Joe Biden’s efforts to move the country toward a clean-energy economy.