To re-enable Windows Defender, access Windows Security, look for Virus & Threat Protection, and activate Real-time Protection. Should you disable the feature via Group Policy, reset it back to what it was. If you want real-time security, leave Defender running; take it off only if you need to restart your computer or use a different virus protection tool.
For more read - https://datarecovee.com/how-to-turn-off-microsoft-defender-in-windows-10-and-11/