This is a question of relational database design, even if your database consists of a shapefile and a text file.
The general idea is to create a table for the graves and give the graves an ID number. Store any information that is relevant for the whole grave in this table.
Then, create a table without geometry for your soldiers. This can be a simple CSV text file, or a table inside a SpatiaLite/SQLite database.
This soldier table has a soldier ID and a grave ID that references the grave this soldier lies in. Store any info specific to this soldier (rank, name, dates of birth and death, death location, ...) in this table.
I would recommend using a SpatiaLiteDB, make a graves table with columns grave_id, grave_location, geometry (use the geometry datatype for that) and a soldiers table with soldier_id, grave_id, name, keep it very simple and start from there.
Terms to search for are entity relationship modeling
, 1:n relation
, SQL
.
For volunteer work I would strongly recommend QGIS, as it is free. You won't want to use valuable funds for the software license.
The QGIS Database manager would be my tool of choice, https://docs.qgis.org/3.34/en/docs/user_manual/plugins/core_plugins/plugins_db_manager.html .
For the joining on the QGIS user interface see https://docs.qgis.org/3.34/en/docs/user_manual/working_with_vector/joins_relations.html#setting-relations-between-multiple-layers .