Gen I has no fingergrooves and pebble texture all around the grip.
Gen II has frontstrap and backstrap checkering.
Gen III has fingergrooves.
Gen IV has "Gen4" stamped on the slide and has the very lazy "modular" grip.
Gen V has "Gen5" stamped on the slide, no fingergrooves, and also has the "modular" grip.
There's various part upgrades, downgrades, omissions, finishes, in between models, (so called) short frame models, and so forth. But there's the obvious differences for you. Some of the early generations didn't have accessory rails, but I don't feel like looking it up.
If it doesn't say on the slide, it's one of the first three generations.