The Optimized Battery Charging setting can prevent your laptop from charging to 100% to help preserve the wear and tear on the battery.
Here is the Apple support article.
Here's how you access this setting: