Prior to the release of "Update Aquatic Part. 2" it was possible to connect the same Xbox Live account to PC and Nintendo Switch, after doing so you could host a world on your Nintendo Switch and then join it via LAN on PC.
This is no longer possible after the "Update Aquatic Part. 2" update. The Nintendo Switch world is inaccessible from a PC using the same Xbox Live account (Note that other Xbox Live accounts from PC are capable of joining the world)