1. On the old phone
Back it up (see our backup tip): Google backup, Google Photos, and a WhatsApp chat backup.
2. Android to Android
Turn on the new phone and, during setup, choose "Copy apps and data" and follow the steps. Use the same Google account. You can connect the two phones with a USB cable or over Wi-Fi.
3. To a Samsung phone
Install Samsung Smart Switch on both phones (it's built into new Samsungs) and follow the steps over Wi-Fi or with a cable.
4. WhatsApp
On the new phone, install WhatsApp, verify the same number, and tap "Restore" when it finds the backup. Newer versions can also transfer directly: WhatsApp, then Settings, then Chats, then Transfer chats.
5. Before wiping the old phone, open the new one and check that contacts, photos and chats are all there. Then remove the Google account from the old phone before resetting it.