it's not that it's "forbidden", it's legal to use them. you'll occasionally hear some country like the uk say it's illegal but that's specifically for a case of a guy who wore his national uniform before and who is now fighting russia. it creates a diplomatic mess, so officially they have to complain about it and say they don't condone it. but nobody ever goes to jail when they come back. they get media interviews and treated well. people have got treated worse coming back from doing journalism on gaza than they have fighting in ukraine. it's very common to see mercenaries used protecting embassies or oil pipelines. but in laymans terms it's a person who is not from the area of the conflict (not a national of the country). "a mercenary shall not have the right to be a combatant" is what the law (or treaty that most countries agree on) says. what that means, in layman's terms is that if you're not officially a combatant, you don't get the benefits of being one - which includes things like being a prisoner of war. because of this, they tend to be very well paid for their work (given the risk). but the problem with mercenaries as machiavelli said is that: you can't pay people to die for you. their use in ukraine is obviously to supplement the dire need for manpower. to have guys put rounds out down the lines in trenches to hold ground. but that's not the same as a guy who's been told that the nazis are at it again and it's time for a great patriotic war part ii. that guy will die for his country. even if things like azov are purely a jewish oligarch and glownigger operation.
Ireland