Ideally this could be done without deanonymizing accounts to service providers unless the user wants to for a 'verified' account linked to their identity publically but I don't think any digital ID system has been built that way. Imagine it acting like OAuth but instead of passing back an identity token it's just verification of age, platforms would store that which would show they had performed the age verification and could be used for other age gates if there are any.