Swap the front/rear tires & tubes, and see if the problem moves. That'll probably tell you whether it's tire or rim.
If the problem recurs but has moved, discard the tire/tube, replace with new, and move on with your life.
If the problem recurs but stays on the same wheel, replace the rim tape and see if it goes away.
If the problem remains, things get harder. You have to find the offender. Use all your punctured tubes to identify exactly where the offender is. You've probably lost orientation, so you'll have to look in two places.
Keep in mind, sometimes tubes just fail. If all your tubes are of the same vintage, you could have serial tube age failure disguised as a puncture.