The ‘optimize battery charging’ feature in macOS has never worked well for me. It tends to stay at 100%, which is not great for my battery.
I recently discovered AlDente by AppHouseKitchen. It’s a paid app that allows you to set a maximum charge level for your battery. There is a free tier I believe, but I almost always eat the paid versions of apps that I like and use.
I’ve been using it for a few days now and it’s been working great. If you’re similarly annoyed by macOS’s battery charging behavior, I highly recommend it. Not a sponsored post, just a (so far) happy user.