In the US at least, you can order glasses online as long as you know the prescription. It's contacts that require a 'valid' prescription which only lasts a year and they will only let you buy a 'years' worth of contacts at a time.
More info on buying glasses/contacts: https://www.consumer.ftc.gov/articles/buying-prescription-gl...
My wife orders hers by dropshipping from possibly China and just enters her measurements from her latest prescription. Is that illegal? Contraband glasses.
From a clinical standpoint, as long as a person has had the same prescription for years and is happy with their vision, things really ought to be that easy.