The answer is no because of how narrow you made the question.
Has the UN ever done anything the US didn't want to happen? Yes.
Has the UN ever prevented the US from doing something that it wanted to do? Yes.
Has the UN ever forced the US to do something? No.
There are a few reasons why this is the case. First, the Security Council of the United Nations is made up of 15 nations, five of which have veto power over all UN Security Council resolutions. The US is one of these nations and can therefore veto any resolution it disagrees with (though the Security Council does not have purview over all activities of the UN, only some).
Next, the United Nations always tries to keep out of the sovereign rights of nations. Part of this is not forcing nations to do things they don't want to do. For just one example from many I'll refer to Security Council Resolution 1674, "Reaffirming its commitment to the Purposes of the Charter of the United Nations as set out in Article 1 (1-4) of the Charter, and to the Principles of the Charter as set out in Article 2 (1-7) of the Charter, including its commitment to the principles of the political independence, sovereign equality and territorial integrity of all States, and respect for the sovereignty of all States." Basically, the only way to get the UN to violate your sovereignty is to violate the sovereignty of another nation, like Iraq did to Kuwait in the first Gulf War (But even then the lack of a method of enforcement meant that it wasn't the UN that expelled Iraq from Kuwait, it was several member nations acting in concert with the UN's permission. The UN does have armed forces, "peacekeepers," but they do not conduct offensive operations).
Finally, most of what the UN does is non-binding. Meaning that it is done on a voluntary basis. Nations can come to an agreement on something and the majority of them can vote that it should be international law but there is no enforcement mechanism to force all nations to adhere to that law. Two examples here would be the Kyoto Protocol and the Ottawa Treaty. Both were approved by a majority of nations but the US does not honor either by its own choice.
No, the UN really is not or ever been capable of forcing the USA to do anything. There are two main parts to the UN: the General Assembly, and the Security Council.
The General Assembly is not capable of creating binding resolutions, meaning the General Assembly could never force the USA or any other country to do something that it didn't want to do. At most, the General Assembly could recommend that the USA do something, which the USA would be free to ignore.
The Security Council is capable of making binding decisions, but it's structured in such a way that the USA is not capable of being forced to do anything. The USA has a permanent seat on the Security Council, meaning it has veto power over all potentially binding resolutions.
No, for a few reasons: It's literally impossible for anything short of the soviet union reborn (and improved) to FORCE the usa to do anything. The US holds a permanent seat on the security council and can veto anything it doesn't like.
More importantly: Anybody enacting economic sanctions will likely lose more than the US does, and it's utterly impossible to even make the US to flinch militarily at the moment if you aren't willing to engage in nuclear war or spend a decade being ground into dust by an occupying army.
Hell, even nuclear war doesn't work- most nuclear powers don't have sufficient arsenals to launch an effective first strike, and many lack the range.
The UN is essentially limited to saying "Look, this will really be more trouble than it's worth, so don't do it" or "We are outraged, but have elected to do nothing but pout."