One of the major defining factors is whether they are held to the standards of military law within that country. For example the French Foreign Legion is part of the army and subject to French Military Court Martial. Whereas Triple Canopy in the US is a PMC(mercenary) due to the inability to Court Martial their “soldiers” for crimes in theater. They are only liable in the civilian courts which effectively means they are liable to no one.
Money and 3rd party status to the conflict. The US gets away with calling PMC’s military contractors because the fighters are from one of the nations involved in the conflict. But a Congolese fighter in Afghanistan would be a mercenary due to 3rd party status. This is assuming that they were also being paid more than rank-and-file soldiers.
But let’s be real. The US is party to every conflict and can claim “War on terror” to send mercenaries to anywhere in the global south without consequences. Along with the geo-political reality that the US has giant double standards.
I am very interested in where these foreign fighters in Ukraine are getting paid though. They are “volunteers” on paper. But there are go fund me style fundraisers to help equip them and support them. I would bet my last dollar that our friends at the CIA are donating funds and equipment. Some of these fighters are much better equipped than the Ukrainian or Russians. I know they can bring some gear from the US. But they have weapons and explosives that they definitely didn’t bring and Ukraine doesn’t field. The real surprise is they have communication gear and night vision that is either not available to civilians or ridiculously expensive. I saw one guy with USARMY comms gear and night vision that is $50,000 to $70,000 per unit. That’s not a volunteer. That’s a spook from an agency that doesn’t exist. If I can dig up the picture I will link it below.