I've got this "Something went wrong" issue when searching in the macOS Music app, too. I first thought it was related to the search query containing space(s), but I have just verified that it happens for "random movement", but not for "black sabbath" (those queries were entered into the search input field without quotes, by the way).
Am authenticated in the Music app using my own Apple ID (the same one that I'm signed in to macOS with), and I have tried signing out and signing back in again from the Music app's Account menu - but it made no difference.
This is on a 2023 M2 MacBook Air (MQKP3B/A) running macOS Sonoma 14.7 with all OS updates applied. The Music app version is at 1.4.6.
As an aside, I'm extremely surprised by the number of freezes and sudden crashes that I get in the Music app generally (and that's ever since getting this laptop 1 year ago). Especially when dragging & dropping to add and/ or reorder entries in the Playing Next sidebar on the right.