The Federal Housing Finance Agency regulates Fannie Mae, Freddie Mac and the Federal Home Loan Banks and has run Fannie and Freddie in conservatorship since 2008, which makes it the de facto rule-setter for most US mortgages.
FHFA are one player in the mortgage lending industry, and an industry of their own, with their own suppliers, customers, software, regulators, and money flows. This full map is on the roadmap.
Meanwhile: how FHFA fit into mortgage lending