Archosauromorphs have developed beaks at least six times--rhynchosaurs, turtles, pterosaurs, theropods, ornithischians, and the poposaur genus effigia. Sauropods might have had beaks but I don't know how accepted that theory is. Synapsids, meanwhile, have developed beaks twice. The first time was in the permian with dicynodonts while second time was in the cenozoic with monotremes. It's unusual for a specific trait like this to evolve so many times among so many different lineage groups, especially when the members of said groups eat different things.
Rhynchosaurs and dicynodonts fed on low-to-the-ground plants along with roots. Effigia ate soft plants. Ornithiscians all either browsed or grazed for plants. Monotremes eat very small prey. Eorhynchochelys were either carnivores or omnivores. Pterosaurs mostly ate fish. And early beaked theropods seem to have been either carnivores or omnivores.
Does anyone know of any theories explaining why beaks evolved so many times for so many different groups? Before anyone says it, no, it was not because beaks are lighter than teeth. Most beak-having groups had beaks and teeth for millions of years before going toothless. This 2013 paper argues theropods may have evolved beaks as a kind of shock absorber, but it's only making this argument for only one beak-having group.