notebook is a 10 year old macbook pro without macos I installed xubuntu 24.04 in. It comes with an embedded battery.
First notebook I bought, not from apple, had a removable battery. The vendor told me to maximize its life I shouldn’t plug the battery in, unless I need it (like for traveling). This way, I’ve managed to keep the original battery in good working condition for 8 years so far.
Back to the macbook: I cannot remove the battery and constantly loading it to up to 80% and discharge it up to 20% seems ridiculous. Furthermore, this would deplete the battery even faster, I believe.
What can I do to spare the battery as much as possible?
Just charge it and use it. Recharging and discharging the battery shortens the life of the battery. In an ideal world, you would charge the laptop battery to 50% and then never charge or use it again, but that’s makes your battery fucking useless.
So use your laptop. My advice is to keep it plugged in as much as possible. Most laptops (even 10 years ago) can run directly off the wall power, which stops the battery from degrading (as fast) as older laptops where they were constantly powered by the battery, and the charger just kept it topped off.
Most of the battery advice you hear is just voodoo bullshit, or it makes a very small difference in the overall life of the battery. Just use your computer like normal.