I know it's easy (if you already know how) on the command line to do this BUT….
Want to rename thousands of files in folders without command line? Don't forget on the #Mac you have the Automater app. A decade of using my Mac and I think i used this twice. Don't forget it's there.
https://cooperjason.com/how-to-replace-spaces-with-hyphens-in-filenames-on-a-mac/
Shortcuts will replace this but worked like a charm and took literally 2 minutes and no typos in a command line.