"So a reptile is any animal descended from the original group called reptiles. Both birds and mammals share ancestors sometimes referred to as reptile-like animals (Reptiliomorpha), but it's not very common for people to talk about mammals as reptiles."
Mammals are from Synapsids[0] and dinosaurs (and modern reptiles) are from Sauropsida[1] — with the commonality being that amphibians split off first [2]. We can draw disjoint clades, which we cannot do for birds and dinosaurs. Beyond that, you’re just talking about tetrapods in general [3]. Reptiliomorpha has multiple names, precisely due to this — eg, pan-amniota.
"So a reptile is any animal descended from the original group called reptiles. Both birds and mammals share ancestors sometimes referred to as reptile-like animals (Reptiliomorpha), but it's not very common for people to talk about mammals as reptiles."