Almost any cleric build is versatile. And it’s the #1 versatile class as you only need Cleric 2 to be a healer, and then you can add some buffs or go full damages.
For example you can go Cleric 2-Bokor 3-X-PD3 and you’ll have great support and damages. If you want to be a “perfect” support you can take Priest just for Res at X. You can go Diev 3-Miko for the extra damage mitigations, utility, and still get a bit more damages. You can go Diev 1-Sadhu 3/Cleric 3-Sadhu 3/Priest 1-Sadhu 3 for the glory of the Sadhuness while still adding support/utility.
Cleric is fun because you have so many possibilities in your builds.
Other trees can’t be as versatile since they don’t have heals or easy ways to res.
Wizards can offer good buffs, support and utility and keep good damages (Thaum 2/3 with Warlock, Shadowmancer, or whatever) which makes them the second most versatile imo.
Swordsmen can always be tanky and deal good damages so it’s not like they’re incredibly restricted but it depends so much on your general build and the synergies between classes that they’re not versatile either. Murmillo-Shinobi has become one of the metas since it offers good protection and burst/damages.
Archers would be the least versatile ones, I suppose. You usually choose a path (support, aoe, single target, crit) and build around it.
One of the things that make these last two trees less versatile is also their weapon restrictions. Wizards and Cleric have the choices between two/three main weapons (if a 1H cleric actually exists), but their skills aren’t restricted. Archers and Swordsmen are annoying to build because of both the skill/classes synergies and weapons synergies.