Off the top of my head, I don’t recall but at the time, I was advised to follow the upgrade instructions in the docs.
{after a quick search}
Here is the post that I started when I ran into issues.
composer create-project mautic/recommended-project:^4 Mautic-new --no-interaction