You cannot be signed into two Xbox Live accounts simultaneously on a single console. However, switching between accounts is straightforward:
Limitations: Even with sharing, two accounts cannot play online multiplayer simultaneously on the same console using one Game Pass Ultimate subscription.