Plugging in while gaming?

I've heard that while gaming, your laptop should be plugged in. And this while the charge limit is at 80%.

But my laptop doesn't have the feature to stop automatically after it reaches 80%, so it just keeps on charging, reaching 100%, and I keep playing while its constantly at 100%.

But I'm not sure how good this is. I've considered another technic, which is: Playing while the laptop is unplugged, until the battery reaches 40%, then plugging it in until it reaches 80%, then unplugging it and so on, always keeping the battery between 40-80%.

But I'm not sure which way is better or if there is a better solution. I'd really appreaciate your guys help🙏