Thanks to Apple Support I was able to solve it. If you haven't saved your music library in iCloud, you need to retrieve the iTunes folder from your backup (or generally the one where all your songs are saved) and another folder in the same directory, Music, which should contain a single file, Music Library, that's up to date.
Close the Music app (if it was ...
The last time I moved my music library, I did the following:
Before starting iTunes, hold down "alt" (or "option") and then run iTunes.
This brings up a dialogue where you can tell iTunes where the library now is.