How to change the implementation of a proxy contract by smart contract

I have a question regarding the proxy implementation.
I have implemented my contracts following this guide:

However, for the upgrades I want to use a governance contract instead of multisig. Now I am struggling to figure out how to do this.
I guess I need to import the proxy contract in my governance contract, which has been set as the new owner using transferProxyAdminOwnership and then instantiate it with the proxy contract address which I want to update.
Could someone tell me which contract I need to import and which function to call?
Many thanks in advance,