sharepoint enterprise – Change SharerPoint 2019 User Profile Service Application Database

For some reasons we would like to change the User Profile Service Application Database. Can somebody point the correct approach to do it.

For e.g. Current user profile service application is hosted on SQL Server A. Now we want to move all the Databases related to User Profile Service Application to SQL Server B. We have My site and content database hosted on SQL Server A and we want to keep them there.