Hello,
Based on the information you provided, I suggest you try the following operations to see if the problem can be solved:
Turn on the sharing service to start automatically. This problem usually occurs when one of the services is not working properly.
Press the Windows logo key + R.
In the Run dialog box, type "services.msc" and then select OK.
Right-click each of the following services, select Properties, and if the service is not running, select the Start menu, and then select Automatic next to Startup Type:
Function Discovery Provider Host
Publishing Feature Discovery Resources
SSDP Discovery
UPnP Device Host
Best Regards
Zunhui