This is likely because Windows 11 is all about security and most of external communication features are disabled by default or require additional settings and layers of security.
In this case I would recommend the next:
In Setting click Network & internet, then select Ethernet
In Ethernet settings pane, under Network profile type, choose Private. This profile will allow devices in your network to be discovered. This profile should also be selected if you need file sharing or use apps that communicate over this network.
The private profile is suitable for home, work places and network that are trusted.
Also In the Control Panel, select Network and Internet
On the next pane, select Network and Sharing Center
Next, select Change advanced sharing setting
In the Advanced sharing center, select the Private (current profile) and Turn on file and printer sharing.
On the same Advance sharing options page, scroll down All networks.
Select Turn off password protected sharing
Then ensure that your firewall settings are correct, but running the next from an elevated command prompt:
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes
netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes
Hope this helps with your query.
--If the reply is helpful, please Upvote and Accept as answer--