Banks are getting back into the business of building mortgage bonds, laying the groundwork for a market that stands to grow as the Trump administration tries to reduce the government’s role in housing finance.

Citigroup Inc., Goldman Sachs Group Inc., Wells Fargo & Co., and JPMorgan Chase & Co. over the past year have restarted or expanded the business of spinning fresh pools of mortgages into securities.

They...