WhatsApp makes automatic backups of your chats, but you can also make a manual backup. On iOS, it’s Settings > Chat Settings > Chat Backup, then
tap Back Up Now.
On Android, just go into Settings > Chat settings and tap Backup conversations to create a backup. This won’t backup your media, so you’ll
need to use a file manager to copy the media folders in /sdcard/WhatsApp/Media.
There’s no way to restore chats directly from WhatsApp, so if you want to restore a backup you’re going to have to uninstall and reinstall WhatsApp.
When you start WhatsApp after the reinstall, you should be prompted to
restore your most recent backup. Just follow the procedure and your
chats should all be back.