Basic concepts for saving project + data in (Q)GIS
Be sure to understand the basic concept of QGIS. There are at least three levels where you must save changes:
- The QGIS project. Imagine it like a specific compilation of certain, external data sources: the layers
- The layer. Imagine it like a container that can contain data. It is saved outside the QGIS project and separately from it. QGIS just links to the data source - be it a file (Shapefile, CSV, geoJSON, TIFF raster etc.), a file based database (e.g. Geopackage) or a server based database (like PostGIS).
- The features (records) of a layer/data source. Once you created (and saved) a layer, you can add data to it or change existing data - be it geometries or attribute information.
Imagine the last two steps like creating a new, empty Word processing file (the layer, step 2). Save it. Then start writing text (adding data): these changes (features) must be saved, as well (step 3).
Save changes in an existing layer
If you have a layer in QGIS, you must hit the pen icon (toggle editing mode) to be able to add new features (records). You must save these changes! Hit the save icon or leave editing mode by again clicking on toggle editing mode, then QGIS asks you if you want to save the changes.
Save layer (as such) permanently
Also be aware that your layer indeed is a permanent layer, saved on your disk or in a database. If you have a temporary scratch layer, changes are saved only in working memory and are only temporary as the icon next to the layer in the layer panels shows (see screenshot). To save it, right click on the layer and click either Make Permanent... (no changes possible, but fast) or Export > Save Features As... - with this last option you can make changes to the exported layer like reprojecting or selecting fields to exprot and their export options.
Save QGIS project
Also be aware of the fact that with the steps above, you saved the layer (data), but not the QGIS project. This has to be saved separately: Menu Project > Save
.