How to setup local ZHA quirks

There is a step-by-step guide here that is probably a little easier to follow:

https://community.home-assistant.io/t/zigbee-guide-how-to-setup-local-custom-device-handler-quirks-in-zha-integration/683473

Also see here for an shorter/simpler less-detailed summerized guide: