To add on to what John Buridan already correctly shared about major changes to the tax code in the early 20th century you might want to check out the Federalist Paper No. 30-36: https://guides.loc.gov/federalist-papers
Hamilton and the Federalists were arguing for taxation and a central bank to deal with the Revolutionary War debts that the U.S. had racked up (foreign loans and veteran backpay and pensions). Since direct taxes were declared illegal in the constitution, most of the money raised by the Federal Government was in the form of tariffs: https://www.ttb.gov/public-information/special-feature
Abraham Lincoln instituted the first national income tax to raise funds desperately needed to prepare the Union Army for the Civil War, and to administer a more complicated system of taxation, he also created the IRS. There were numerous repeals and court battles until in 1909 the constitutionality was settled by the 16th amendment. https://www.amazon.com/Ways-Means-Lincoln-Cabinet-Financing/dp/0735223572
To answer your question, the big driver of federal taxation for the past 80 years has been social security (and medicare to a lesser extent), instituted in the 1930s(medicare in the 1960s). If you sum up state and local revenues (mostly property and sales) they are greater than federal, when you take out insurance programs ($ you get back) and intergovernmental transfers ($ state/local get back) from federal taxes. Here's a good breakdown of the revenue sources: https://www.taxpolicycenter.org/briefing-book/what-breakdown-revenues-among-federal-state-and-local-governments
To answer why there's so much federal taxation relative to state and local, even if there's greater spending by state and local, you have to examine the expansion of federal government programs from the New Deal through WWII, to the Great Society, the Cold War, the Green Movement, and 9/11.
- Dept. of HHS was created in the early 1950s along with medicare/medicaid.
- NASA in the 1950s to carve out space programs from DoD.
- NSF in the 1950s to unify and manage federal R&D.
- HUD in the 1960s to support urban renewal.
- Dept. of Transportation in the late 1960s to regulate interstate travel (mostly air traffic and highways).
- EPA in the early 1970s to regulate clean air and water.
- US Consumer Product Safety in the 1970s for consumer protection.
- Dept. of Energy to carve out nuclear weapons from DoD and manage U.S nuclear power in the 1970s.
- Dept. of Education in the early 1980s to measure performance and redistribute funds to ameliorate inequities.
- VA in the late 1980s to carve out veteran health from the DoD.
- Dept. of Homeland Security to standardize and unify national security.
As you can see, many of these agencies and departments deal with externalities states may impose on their neighbors, collective action problems that encourage bad actors to defect and of course, plenty of pork projects to spread federal money around the country.