Use Smart charging in Windows - Microsoft Support
To help with this problem, some device manufacturers turn on Smart charging in Windows 11. With Smart charging, you don’t need to worry about unplugging your device to keep it from staying charged to 100% for longer periods of time—Smart charging handles charging for you.