There’s multiple companies bringing this to the market as telemedicine (edit: yes already now in the US). Basically you do an eye test (to measure visual acuity) at home using your phone or computer and an optometrist reviews the data and approves / re-approves your Rx. Then you can order online.
For limited prescription ranges it is also possible to give out a complete Rx via a remote examination but FDA has yet to approve a device on the US market for this. In the EU it is already being done.
Disclaimer: I worked for one of these companies.