How can I create user lifecycle hooks in v4?

I’m also looking for the answer to this.

I’ve tried various ways inside src/extensions/user-permissions/strapi-server.js. And I’ve tried using strapi.db.lifecycles.subscribe() from this documentation but no luck