Up until 2014 it was a mission undertaken by the International Security Assistance Force (ISAF). ISAF was dominated by NATO, and if you look at the list of commanders, was dominated by American generals from 2007 to its dissolution in 2014. ISAF was led by NATO, but allowed non-NATO members such as Australia to participate. ISAF was not sponsored by NATO but by the United Nations itself under Resolution 1386, but in 2003 it became controlled by NATO. As the USA contributed the most money and personnel to ISAF, in practical terms it had a "controlling interest," so to speak.
However, the ISAF mission was ended in 2014. Today, Resolute Support is the name of the framework that was struck between NATO and Afghanistan and affirmed in UN Resolution 2189 to replace ISAF. It appears to be a kind of ISAF Round 2: it is a multinational force under the leadership of NATO that includes non-NATO members, yet as the US provides most of the money and personnel, the US has a controlling interest in how it conducts its business.
For an American troop on the ground, it means that you probably have an American local commander who eventually reports up to the NATO-sponsored commander of Resolute Force. You work under the framework of the Status of Forces Agreement (SOFA) signed between Resolute Force and the GoA (Government of Afghanistan), and you work under the NATO rule book. You get a NATO medal for your service if you were in theater for over 30 days.
In summary, at the ground level NATO rules apply. Overall strategy is reflected by NATO leadership and affirmed by the UN. As the USA is such a huge member of NATO, it exerts a lot of influence on the entire chain.