Dinosaurs are more closely related to birds.
Are alligators and crocodiles classified as lizards?
I don’t think so, but ...
Wiki for what its worth:
“Lizards are a widespread group of squamate reptiles, with approximately over 6,000 species, ranging across all continents except Antarctica, as well as most oceanic island chains. The group, traditionally recognized as the suborder Lacertilia, is defined as all extant members of the Lepidosauria (reptiles with overlapping scales) that are neither sphenodonts (i.e., tuatara) nor snakes they form an evolutionary grade. While the snakes are recognized as falling phylogenetically within the Toxicofera clade from which they evolved, the sphenodonts are the sister group to the squamates, the larger monophyletic group, which includes both the lizards and the snakes.”