I’ve had similar when moved all my music off the laptop and onto an external hard drive to free up laptop hard drive space.
It was a few years ago when I did that but easiest way was to remove everything from my iTunes library and reimport the lot. All 18k songs. Takes a bit of time but everything plays again. You might lose any playlists you’ve got set up as would not put the songs back in that were already in them.
There may be an easier way than the above method. Perhaps try a google search and see if any one else has had more success?