It is good to follow the main advices: don't go below 20%, use optimized charging, try not to leave it at 100% too long, don't charge during heavy use, and ideally, use the 5W power brick.
However, you buy an iPhone to use it, not so you have a battery to take care of. So the first rule is: use your iPhone the way you want to.
If your battery health drops below 80% during the first year (very unlikely), use your warranty to get a new one.
If your battery only drops below 80% later on, either learn to live with a smaller battery, , spend $69 on a new battery, or sell it and get a new iPhone.
For comparison, my iPhone 7 Plus is now at exactly 80%, after 4.5 years of intensive use. 80% is still absolutely fine for me. So it's a non-issue really. Also, the battery of an iPhone 12 Pro Max is massive, so at 80% it will still be a huge battery.