The federal budget deficit for fiscal 2024 was $1.8 trillion, up 8% from a year ago, as the government’s spending continued to swamp revenue.