macOS 10.14 Mojave is the only version where Photos used the filenames when sorting the photos by the titles. It has been a short joy. The Catalina upgrade killed this nice feature again. Since Catalina Photos is a very different application. It has intriguing new features, but for my purposes the Mojave version has been the best version of Photos so far.
Also scripting does not work as well as it did in the previous system versions. To run the scripts I posted, you have to select the photos in a top level album. My scripts do no longer work, when the album is enclosed in a subfolder. Old Toad has provided a page with compiled version of some of our scripts. http://www.oldtoad.net/TT/No.P01.html
You can simply run them like any other application from the Dock or the Desktop after selecting the photos you want to change in Photos in a top level album:
07 - Batch Change Titles to the File Name with Extension
08 - Change Title to the File Name without the Extension
I prefer to open the script in Script editor, so I can see any error messages.
Before you try any scripts someone posted here, these them on a small test library, and make sure you have a backup, before you run a script on your main library. It is not possible to undo any changes created by scripts.