They do wear out eventually, but the end of their useful life is a whole crapload of rounds if they’re well-made, and most good guns can have parts replaced either by the user or by a smith, so you can keep them running a long time if you oil them and keep them relatively rust-free. If a gun is so messed up it can’t fire or if it fails catastrophically and blows up, if it’s truly and permanently at the end of its life, I think most folks do indeed throw them in the trash, assuming they have no historical value. Maybe disassemble them or cut them up with a hacksaw first. Once it stops being able to be a gun anymore, it’s just junk.
That’s a flash-forward, a flashback is a dip into the past, hence the “back” part