Saying “this doesn’t work” doesn’t help us help you.
Look at the errors from Z2M. One of those error lines will tell you to check Zigbee2MQTT fails to start/crashes runtime | Zigbee2MQTT. Right below it is the exact error which you can find on that page.
Spoiler alert: it’s usually because ZHA has been autodiscovered & you need to disable/ignore it for Z2M to work.