The move is not the first time the Trump administration has sought to crack down on immigrants using the public safety net. For months, Stephen Miller, one of President Trump’s top advisers and the architect of his immigration agenda, has pushed the administration to complete a new regulation that would penalize legal immigrants who rely on public benefits like Section 8 housing vouchers or food assistance. The regulation would give officials more power to declare an immigrant who uses welfare benefits to be a “public charge,” making him or her ineligible for permanent legal status.

Like the administration’s other efforts to crack down on immigrants, the public housing rule also fits Mr. Trump’s message to his core supporters as he begins his 2020 re-election campaign.

The president and his top political advisers believe that no issue better symbolizes their commitment to keeping the United States safe and prosperous than Mr. Trump’s pledge to rid the country of undocumented immigrants and drastically reduce the flow of legal immigrants into the country.

In addition to a crackdown at the southwestern border, where Mr. Trump has sought to toughen asylum policies, the White House has freed immigration officers around the country to round up and deport undocumented immigrants, regardless of whether they have committed serious crimes.

The administration has also moved to limit the highly skilled immigrants whom technology companies bring to the United States and to subject them to much tougher vetting. A recent proposal would also deny the spouses of such immigrants the ability to legally work in the country, a change that could lead many couples to leave.

During the 2018 midterm elections, Mr. Trump campaigned on little else, to the dismay of some Republican lawmakers, who argued that the president should have focused more on the booming economy and the passage of a major tax cut during his first two years.

But Mr. Miller and Mr. Trump have shown little interest in pulling back on the immigration agenda.