Event Log:
Event Type: Error
Event Source: Userenv
Event Category: None
Event ID: 1500
Date: 9/21/2021
Time: 3:43:25 AM
User: test.local\XXXXXX
Computer: TERMSERV
Description:
Windows cannot log you on because your profile cannot be loaded. Check that you are connected to the network, or that your network is functioning correctly.
If this problem persists, contact your network administrator.
DETAIL – Insufficient system resources exist to complete the requested service.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Error screenshot:

Solution Refer:
https://docs.microsoft.com/en-US/troubleshoot/windows-server/remote/error-log-on-to-terminal-server