custom user insert on hook

Im trying to create a custom user collection so I can customize it more.
to do so, I created a CustomUser collection with a ‘user’ reference field that references to the standard user collection (OneToOne relationship). I want to create a afterInstert hook to the PrivateMembersData collection, which will create a custom user every time a user registers to the platform and set the user field on that custom user to the regular user.
I have this:

import wixData from 'wix-data';
export function Members$PrivateMembersData_afterInsert(item, context) {
console.log("in before insert");
wixData.insert('CustomUsers', {'user': item.id}).then( (res) => {
console.log("in hook after insert");
console.log(res);
console.log(context);
} );
return item;
}

but its not working. I thought it was a problem with promises so I also tried:

import wixData from 'wix-data';
export async function Members$PrivateMembersData_afterInsert(item, context) {
console.log("in before insert");
await wixData.insert('CustomUsers', {'user': item.id}).then( (res) => {
console.log("in hook after insert");
console.log(res);
console.log(context);
} );
return item;
}

but that didnt work either.

First off, see here about working with the Wix Members app collection called Members/PrivateMembersData.
https://support.wix.com/en/article/corvid-wix-members-privatemembersdata-collection-fields

Also, as for using datahooks on that collection, then make sure that it is actually allowed before trying to set it up.

Wix Members app collection.

You only get these:
Before Get;
After Get;
Before Query;
After Query;
Before Count;
After Count;
On Failure.

Wix Dataset you add yourself.

You get these:
Before insert;
After Insert;
Before Update;
After Update;
Before Remove;
After Remove;
Before Get;
After Get;
Before Query;
After Query;
Before Count;
After Count;
On Failure.

@givemeawhisky can you suggest an answer on how to achieve this then?

I am trying to do the same thing. Did you ever find a solution Refael?