It is generally assumed that it is not possible to register as an autonomous sex worker. There are, however, a few exceptions to this rule. Please contact an organization for sex workers if you have any questions in this respect.
For example, if you work as a masseur, you can register as a self-employed person. Detailed information about everything you have to arrange before you start working can be found here.
If you register as a self-employed person, you have to pay taxes and social insurance contributions but it also means that you build up a pension and are insured in case of illness.