Let me start by saying that flying in ANY commercial airplane is incredibly safe. In fact, the inside of a flying commercial airplane is literally and statistically the SAFEST place you can be. No place can be 100% safe. But no place is safer than inside of a plane in flight.
All airplanes are safe compared with, say, your house, in which you are far more likely to die than you are in a plane. You might think a newer plane, with newer technology, might be safer than an older plane. And you might be right, I don't really know. But there is a case to be made that an older model of a given type of aircraft might be a little bit safer, mathematically speaking.
Older planes, logically, have been in flight for a longer time with nothing going horribly wrong. To the extent that they are being properly maintained, the reliability of older planes is literally time tested. Newer planes have not been in the air as long, so they don't yet have a long reliability record. It's not that they aren't effectively as safe as older planes, but rather they are statistically less safe. Up to a point.
There's a term in engineering for the improbability of something going wrong in a piece of technology the longer it's in use. I don't remember what the term is, but if anyone reading this is an engineer or lay person who knows, please leave it in the comments.