President Trump’s decision, announced while visiting his golf course in Ireland, was the latest shift in his trade policies.