Hello,
You can restore from a backup and get all the cards back.
To do this, follow this tutorial: How to Restore From Backup
This most likely happened because you did not protect your cards, you need to protect the changes you make otherwise they will be overwritten by AnkiHub when syncing.
This guide will have everything you need to know about protecting fields and tags: π Protecting Fields and Tags