There are many reasons for this problem; one of the reasons is that Windows Update failed to install or update the Network drivers, in that case, you have to update the required driver manually.
If when you try to map a network drive in Windows 11/10, but you are unable to map a drive or connect a drive remotely with the error message The network folder ...