It doesn't happen by default. You can configure this security setting by opening the appropriate policy under
Computer Configuration\Windows Settings\Security Settings\Local Policies\Audit Policy
https://video2.skills-academy.com/en-us/windows/security/threat-protection/auditing/basic-audit-logon-events
--please don't forget to Accept as answer if the reply is helpful--