These threads always bring up a hypothetical digital ID that simply says “over 21”, but it’s missing the key point that the ID needs to also give enough information to reasonably tie the identity to the user. Otherwise everyone underage would run around with borrowed or stolen IDs because there was no way to prove it did or did not belong to them.
In theory a digital passport could reveal age 21 or older with a photo and name, but it’s only marginally less info for a lot more complexity.