Showing your ID to buy alcohol because the govenment has decided that under 18's cannot buy it. That's widely practiced and accepted without issue
There's two components to this.
1. It's widely accepted because in most cases the cashier just glaces at the ID. How is the vaccine passport going to be implemented? Are they going to give you a laminated ID card, or is it going to be some QR code thingy on your phone? The latter would necessitate some sort machine scanner, which would mean it's trivially easy to turn this into some sort of a tracking system.
2. "being 18" isn't a medical intervention that's forced onto people.
The situation is likely different in the United States, but in Germany the youths solve this problem (under 16's/18's cannot buy alcohol) simply by the fact that always some friend has an older brother or sister.