As per whatsapp if you delete your whatsapp account then your messages also be deleted. You can’t regain access to it.
But if you just uninstall your whatsapp from your phone then your messages still remain. When you reinstall whatsapp then you can get back your whatsapp messages.
The best way to get back all chats and media details by time to time backup.