That is the finding from a JAMA Network Open paper by Zhang et al. (2023). The authors use 2016-2022 data from the IQVIA Longitudinal Prescription Database, which claims to capture 92% of retail pharmacy prescriptions.
First, fewer opioids prescriptions were made (extensive margin):
During January 2016 to December 2022, the monthly surgical opioid dispensing rate decreased from 661.2 to 426.0 prescriptions per 100 000 people (35.6%). This rate decreased 0.89% (95% CI, −0.96% to −0.81%) per month during January 2016 to January 2020, declined sharply and rebounded during February to July 2020, and declined 0.45% (95% CI, −0.61% to −0.29%) per month from August 2020 onward
Additionally, when opioids were prescribed, the amount of opioids per prescription also declined (intensive margin):
Monthly mean total MMEs [morphine milligram equivalents ] per prescription decreased from 414.0 to 222.0 prescriptions (approximately 44 pills containing 5 mg hydrocodone) during January 2016 to December 2022 (46.4%). This quantity decreased 0.47% (95% CI, −0.60% to −0.35%) per month during January 2016 to May 2017 and 1.34% (95% CI, −1.38% to −1.29%) during May 2017 to January 2020. After an increase and decrease during February to July 2020, this quantity declined 0.39% (95% CI, −0.44% to −0.34%) per month from August 2020 onward .
You can read the full paper here.