Note that proper detective work would identify the cause of this fairly easily.
Sometimes it's not possible when you get a flat in the rain at night on the side of the road, but in slightly more convenient conditions you should always take a few minutes for a proper post-mortem examination.
This starts before you even take the tire off. Ideally, use a grease pencil or piece of chalk or some such to mark the valve position on the outside of the tire, and also identify the left vs right side of the tire (and similarly keep track of left vs right side of the rim).
Remove the tube from the wheel (it's not always necessary to completely dismount the tire), mark the tube to identify left vs right side, just as you did with the tire, and inflate the tube to find the leak. When you find the leak, observe where it is!!
A hole on the inside diameter of the tube, where the tube is sitting adjacent to the spoke nipples, almost always results from a spoke poking through, or a defective rim strip which allows the sharp edges of the nipple to "worry" a hole into the tube.
A hole on the side, near where the edge of the rim would be, suggests a rough edge on the rim, a bit of wire poking out from the tire bead, or "snake bite" due to the tube getting squeezed between tire and rim when you hit a curb or other large obstruction. Note that "snake bite" will often, though not always, result in two cuts in the tube, maybe a half-inch apart (hence the name "snake bite").
A hole on the outer diameter of the tube, under the tread of the tire, suggests a "normal" puncture.
But having found the hole in the tube, you've only completed half of the investigation. Lay the wheel flat, lay the tire on (if it's been dismounted), and the tube on the tire. Use the marks you made earlier to position the tube and tire in their original orientations relative to each other and the wheel.
Observe again where the hole is (you marked it, right?) and check the same location on the tire and/or rim for any sort of foreign object or defect. This could be a bit of glass in the tire, a piece of wire, a large hole in the tire (needing a "boot"), a sharp edge on something, etc. Check both by sight and using your hand to feel -- sometimes you can see a defect you can't feel, and sometimes the defect can be felt but not easily seen.
Also feel around in the tire generally for a loose fragment of glass or some such. Sometimes a fragment gets in there and moves around.
About the only problem this procedure won't identify is damage from improper installation. Such damage is usually along the sides, and may have the appearance of a cut vs a pin-style puncture. But such damage usually is the result of using screwdrivers or metal "spoons" to service the tire, vs plastic "spoons" or a Quick Stick.