There are many ways to handle the database migration of WP sites. My personal favorite is to use the wp-cli tools available on stock EE4 installs. But there are also various plugins that can backup, restore and migrate your site that I think are underappreciated in the ease and simplicity they provide. Then there is utilities such as phpMyAdmin (PMA) that you will find on both Cloudways and Easyengine tools.
The command line method as explained by the other poster is a valid method as well. But starting with easiest:
Plugins - To me they are all similar. I recently tried WPvivid Backup plugin and was pleasantly surprised at how easy it was to backup and migrate a site with the free version. I have used Duplicator and other in the past with success as well. The beauty of this method is that you also get a good working backup of your entire site while performing the migration and have a plugin that can continue to provide backups.
PMA - If all you need to do is copy over databases, then using PMA is a simple GUI way of managing the sql functions without all the syntax of mysql -u root -ppassword etc. It is mostly a click to export and click to import process.
WP-CLI - this is hands down my favorite as it is quick and never seems to fail me. On cloudways you would use their database tool to export a sql copy of your working database, move it to the new site just as you would your wp-content folder and then do the following on your new EE4 site:
sudo ee shell yoursite.com
wp db import databasename.sql
That’s it. The only catch is that you need to make sure you run the command in the same folder that the sql file resides in or make sure you point to the path where the file is stored. By using the sudo ee shell command you bypass any need to learn and use docker exec commands and all the switches. And exporting with this command is a simple wp db export and you have a database backup of your site.
Hope some of this helps you get rolling. Do this once or twice and moving/migrating sites becomes a 10 minute task between any platforms.