This can be a difficult problem. There are so many different things that can cause a problem accessing a local device as a server. So if what I'm an out to say doesn't work, then please start your own thread for your own problem. Otherwise, these kinds of things get extremely confusing.
One possible cause is a new feature/bug in macOS Ventura and later. In System Settings, there are two different places to set your computer name. The system will allow you to set two different name, which I strongly discourage. Unfortunately, the comparable "Sharing" setting that people would have used in the past is not the setting that people should use in Ventura+.
In Ventura, go to Settings > General > About. Under the picture of your computer and the model name, there is a field for the computer name. You can double-click on this name to change it. This is the setting to change.
Then, you go to Settings > General > Sharing. At the bottom of the list you should see "Local hostname" which should be the same name you specified above with ".local" appended to the end. This is the old setting that you shouldn't use anymore.