There need to be backups that have been made in order to recover, as the data does not follow automatically.
On Android, these backups apparently occur on Google Drive. On iPhone, they happen on iCloud from the iPhone and/or on iTunes when you connect your iPhone to your Mac. This is provided that it is set up to do so (I don’t know if it does so by default unless you’ve disabled it, or if it needs to be consciously activated).
You'll easily find explanations online for restoring your account from Android to Android and from iPhone to iPhone using these backups. However, if you’ve switched from iPhone to Android or from Android to iPhone, you will need software to do it. A priori, (but to be verified, I haven’t explored all situations) the so-called free software is only free for their very limited trial version, and you will need to pay to restore all your data in those cases.
So, I changed my phone by deleting my WhatsApp account on the other phone. Now, when I try to install my account on my new phone, I can do it, but no conversations or groups appear.
You need to enter the credentials for your old account (most likely linked to your old phone number)
Otherwise, you can restore your conversations from a backup if you had set it up:
https://www.clubic.com/tutoriels/article-862087-1-comment-transferer-conversations-whatsapp-smartphone.html