Numa Pompilius was from Sabine origin and because of his exemplary way of life he was chosen king. Like Romulus he wished to consult the gods before accepting the crown.
Titus Livius (1.18) tells us how an augur performed the appropriate rites and prayers. When the required signs of the gods were received Numa Pompilius was crowned king.
Numa Pompilius was a peaceful king, but realized the Romans were a war-liking people and decided to get the supports of the gods. He had built the temple of Janus. The door of this temple should be closed in times of peace and kept open in times of war. Until the reign of Augustus it would be closed only between the two Punic wars.
After this he designed a calendar based upon the moon cycle (28 days) and 12 months. Once in the 20 years they had to insert an extra month in order to bring the time back in line with the the seasons. This system would end up in a mess. When Julius Caesar
in his function as pontifex maximus
reorganized this calendar into a Sun-based model he had to enter 3 months to bring the new calendar parallel to the seasons.
Also he created a religious system and appointed the Roman priests, belonging to this system. He imported te service of Vesta from Alba Longa and set an allowance and rules (like compelled virginity of the six maidens). but kept the most important functions to himself, but introduce the flamines for Jupiter, Mars and Quirinus, the deified Romulus. He selected 12 young men for the service of Mars Gradivus the so called Salii.
These and a lot more rites and priesthoods were al alleged to Numa Pompilius. In fact too many for one lifetime. See also Life of Numa by Plutarchus.