If it was stolen from an owner who reported it they have the serial number. So, if one picked it up to keep/use and it was later used legally in self defense and then documented/discovered... the new owner would be in world of shiite for possession of stolen firearm.
No one throws a Glock out the window who isn’t a perp. That’s a given. Depending on where this was, could have been a service weapon yet another bozo “lost” while jogging.
Another option— have the S/N run by a friendly officer and see what’s what— not saying you have it etc.
But, just picking it up to use— dangerous on a lot of levels if it’s jamming or has been misused/damaged.
It may have fallen from my canoe on the way to the lake:)