Two routes exist, and agencies almost always sell you the more expensive one. A permit in your own name, or a company. Here is what each costs, and the figure that actually decides.
Working alone, the cheapest route is a freelance permit: from 4,020 AED a year at DMCC, a permit in your own name, not a company. The cheapest company licence is Fujairah Creative City Free Zone, 3,500 AED a year without a visa; with a residence visa, Fujairah Creative City Free Zone, 9,000 AED.
Freelance permits
A permit is issued to a person, not a company. 16 zones issue one, 13 publish its price.
What is the cheapest way to work alone legally in the UAE?
A freelance permit issued in your own name, rather than a company licence. Several free zones publish one, and the cheapest published permits start well below the cheapest company licences. The permit alone does not include a residence visa.
Does a freelance permit give me a residence visa?
Not by itself. The visa is a separate cost, and it is the one that changes the total. On the few zones that publish both figures, adding one visa roughly doubles what the permit costs on its own.
Should I take a permit or a company?
Take the permit if you invoice your own services alone and expect to stay alone. Take the company if you will ever hire, take a partner, sell the business or trade goods. A permit cannot do any of those, and switching later means starting again.