How to assign a group to a user based on their email domain in Magento 2.3

I want during registration process to assign a different group to users that has a specific domain e-mail:

So user with:
will be assigned to a specific group all others will be assigned to default group.

I searched a lot, but I found only solutions for Magento 1.

Thank you