He also said Washington was thinking about "severe things" in response to North Korea's test-launch this week of an intercontinental ballistic missile with the potential to reach Alaska.
Trump told a joint news conference with Polish President Andrzej Duda on Thursday that it was "past time" for all countries in the alliance to "get going" on their financial obligations.
The White House had said Trump would use the stopover in Warsaw to showcase his commitment to the North Atlantic Treaty Organisation, which he once called "obsolete", bemoaning allies' repeated failure to spend the recommended 2 percent of GDP on defense.
He had unnerved allies in May, not least those in the east concerned about Russia's more assertive military posture, by failing to explicitly endorse the principle of collective defense enshrined in the NATO treaty.
While he did not directly mention that principle in Warsaw, he did say that the United States was working with Poland to address Russia's "destabilising behavior". Duda for his part said he believed Trump took Poland's security seriously.
Trump said the United States would confront the threat from North Korea very strongly, and that nations must publicly demonstrate to North Korea that there were consequences for bad behavior.
Trump has this week expressed frustration that North Korea's neighbor China has not put more pressure on Pyongyang, notably through trade, to try to rein in its weapons program.
Trump said "something" would have to be done about North Korea. He said he did not draw "red lines", but that Washington would take a look over the coming weeks and months with regard to North Korea.
En route to a potentially fractious G20 summit in Germany, Trump was due to take part in a gathering of leaders from central Europe, Baltic states and the Balkans, an event convened by Poland and Croatia to boost regional trade and infrastructure.
Trump said the United States strongly backed their "Three Seas" initiative.