In two tweets on Sunday, Mr Trump said that he didn't want the Kurds to provoke Turkey either.
US forces have fought alongside a Kurdish militia in northern Syria against the Islamic State (IS) group.
Mr Trump's comments on Sunday followed further criticism of his abrupt decision to withdraw US forces from Syria.
A senior figure in Saudi Arabia's royal family, Prince Turki al-Faisal, told the BBC it would have a "negative impact" that would benefit Iran, Russia and Syria's President Bashar al-Assad.
US Secretary of State Mike Pompeo is currently in the Saudi capital Riyadh as he tours the Middle East to reassure US allies in the region.
What did Mr Trump say?
The president defended his decision to withdraw troops, saying any remaining IS fighters could be attacked from an unspecified "existing nearby base".
He did not say how Turkey's economy would suffer if it attacked the YPG. Mr Trump also mentioned the creation of a "20-mile safe zone", which the BBC's Barbara Plett Usher says hints at the kind of solution Mr Pompeo is trying to negotiate.
More about: Turkey