Your chat histories aren’t saved on WhatsApp’s servers, which means that you’ll lose all your chats when you switch devices or delete the app.
You can save your chat histories by clicking on the three little dots in the upper right corner of your screen, and then going to Settings – Chats – Chat backup. On Android, it will automatically offer you to back up on Google Drive, and on iOS, your default option will be the iCloud.