This has been driving me nuts for months but I think I have found the cause, and the solution - credit to Skulfighter from this thread: https://answers.microsoft.com/en-us/windows/forum/all/cant-access-the-other-windows-11-computers-on-my/97d61be9-4e6a-40d0-a64a-ce1217ab2544
During new Windows 10 / 11 setups, you are immediately prompted to create a PIN and therefore you never log in to Windows with a password, so it is not cached anywhere. The resolution is to turn OFF Windows Hello, log in with your password to get it cached, then you can turn on Windows Hello again:
Open Settings > Accounts > Sign-In Options
Additional Settings > TURN OFF "For improved security, only allow Windows Hello sign-in for Microsoft accounts on this device"
Close and re-open Settings > Accounts > Sign In Options. A Password option should now be available (under the Security Key option)
Click Password, and you will see "You're all set up"
Press "Windows Key + L" to lock your computer, and unlock using your account password
Re-enable Improved Security option if required
Your share should now be visible on your network. I have tested on a new Windows 10 and Windows 11 build and both shares are now visable to to all other machines on my network (on Windows anyway - my Android phone can not see the SMB share unless I enable SMB1, but thats another issue!)