What went wrong
From your description it's clear what happened: your data is saved in a specific CRS. When you load it to QGIS, it should automatically be recognized, do not just set any other CRS. See: https://gis.stackexchange.com/a/392388/88814 and https://gis.stackexchange.com/a/383437/88814
What to do to solve the problem
If no CRS is recognized, go to the site where you downloaded the files and look for description or metadata to see in what CRS the files are saved. Then assign the layer CRS to this value: right click layer / Layer CRS / Set Layer CRS
. Be careful with this. Only do this when you exactly know which CRS to set. You can't freely choose a value here, it must be the one that the data is saved in.
How to find the correct CRS
When I click the links you posted, I don't see which files you downloaded. However, the spanish site says (for most of the datasets):
ETRS89 en la Península, Islas Baleares, Ceuta y Melilla, y REGCAN95 en
las Islas Canarias (ambos sistemas compatibles con WGS84). Proyección UTM en el huso correspondiente.
I don't konw spanish, but it seems there are several projection, between else the local UTM zone - this is UTM zone 30 for Eastern Spain. Apply this as you layer CRS: EPSG:32430
- EPSG:25830
also works.
The french datasets contain an info about CRS in their filename already: LAMB93-IGN69
. Set the layer CRS to the corresponding value (no EPSG code, but typing lamb93
in the CRS selection dialog in QGIS will give you the necessary CRS).
How the solution looks like
I downloaded a sample of both datasets and set layer CRS, see results with corresponding CRS settings (the rasters are set to semi-transparent to see where they are located):
Spanish dataset:

French dataset:
