From the horse's mouth:

"If you hold a Working Holiday (subclass 417) or Work and Holiday (subclass 462) visa, you can do any kind of work over the course of your 12-month stay in Australia. There are limitations on the timeframe you may work with any one employer.

Mandatory visa condition 8547 limits you to a maximum period of 6 months’ work with any one employer. If your work does not fall within an exemption to condition 8547, you will have to seek permission to work longer than 6 months for the same employer."

https://immi.homeaffairs.gov.au/visa...ame%20employer.

It can't be any clearer than that. They can do ANY work they want to do.

Of course, if they do a job that would be illegal by any other law, eg. Drug dealing, hitman, etc, then they are in trouble because of that law, not due to visa restrictions.
Sex work is NOT illegal in NSW.