Update Account owner based on Contact owner

Update Account owner based on Contact owner

Is there a way to automate updating ownership of accounts based on related contact owner?

Typically we have contacts in our CRM and then we have Accounts created through an API when they sign up on our website. The goal is to assign those newly created accounts to the owner of the contact.

Thanks,
Esben