I've been having a lot of trouble with this error, in multiple versions of QGIS/QField (3.22 LTR, 3.24.2, 3.26.2) and have checked out useful answers about getting the uuid of the parent and the foreign key of the child properly set up, etc etc, with success in some test projects, but not the actual one.
I suspect but can't really be sure that the problem arises when the uuid is added to the parent with the Fields item in the layer properties, rather than created with the new Geopackage Layer item, but I don't think there's any easy way to escape adding it, because I'm trying to import a .gpx file from a walk mapping app (MyTrails by FrogSparks), which I had been (ab)using as a GIS app. Some test projects I've made with the parent layer fully created by Create Layer|New Geopackage Layer do not have this problem, and work fine (but don't have the data).
So the questions are a) is my suspicion that fields added later cannot be used for creating many-to-one relations correct b) is there anything reasonably straightforward to deal with the resulting problem (I've tried import the .gpx as a shape file, adding the uuid there, and then exporting as Geopackage, but that didn't work).
And a further c) there is an fid field which is the default provided by the Relations editor, but every tutorial I've ever seen doesn't use that, but rather added uuid attributes. Is there some reason for using uuid, such as greater compatibility with things you might want to do later? (It didn't work, but maybe I made some mistake in that experiment, but, if it doesn't work, why is it presented as the default?)