Which prescription medications shrink pores?
If over-the-counter products have not changed how your pores look, the next question is what a prescription can add. This page answers it from one clinical source.
The named prescription option is a retinoid
On prescription options, health.clevelandclinic.org states: They can prescribe stronger retinoid products, like Retin-A® (tretinoin), which are more powerful than over-the-counter options.

That is the one medication family the source names.
How it is said to work
The same page continues: “These medications decrease oil production, which decreases the appearance of pores.” The effect is on oil, and the source ties it to how pores look.
The first step and the limit
The first step is a dermatologist visit, because a prescription is a prescriber's decision. This is not something to handle alone.
This question can wait until you are ready to book. Nothing here is urgent.
Other reading on pores and oil
The health.clevelandclinic.org list of dermatologist approved tips to shrink your pores covers the options that sit before a prescription. For a different angle, there is a pilot study of skin laxity and oiliness after monopolar radiofrequency treatment at ncbi.nlm.nih.gov.
Next questions worth checking
If a prescription is the plan, the dermatologist visit is the start of it, not the end.