Best way to avoid constipation when taking oxycodone?

Yes. All narcotics can cause constipation. Keep up on your fluids. Drink plenty of water. Use a mild stool softener like MiraLAX (polyethylene glycol) which is over the counter while actually on the drug.
Constipation. I have my patients increase their fiber and water but narcotics cause constipation so I have my patients take milk of mag with the water. They never seem to have that problem doing this.
Ask the prescriber. Whoever prescribed this for you should be able to recommend what you need and check to be sure the drug is the only cause.