You can get a copy of your glasses prescription (Rx) from your doctor or eye care professional. In the USA it is federal law that a prescription must be given to you at the conclusion of an eye examination (as long as you’ve paid for this service), whether you ask for it or not.
Please note, from the above link, that it is unlawful for them to ask for any additional fees or set conditions (like requiring a glasses purchase only from them, or requiring you to sign waivers or disclaimers) for a signed copy of your prescription.
In essence, if a doctor is willing to sell you glasses using your new prescription, he/she should also provide your prescription to allow you to purchase elsewhere, and can’t warn or scare you into buying only from their office.
Please be advised that this law doesn’t apply to ophthalmologists or optometrists employed by federal, state, or local governments.
Your Pupillary Distance (PD) is not technically a part of your prescription that they are required to measure, but most doctors’ offices are happy to measure this for you.