Also, remember that only religions will ask for temples. They’re colored differently from deities in the menu for creating temples. My advice (besides possibly writing the information down when the petition is made) would be to make a non-denominational temple as the first temple in the fort, and then wait for each individual temple petition to be made and start preparing the room for the new temple ASAP (this is mainly to try and prevent a backlog of agreement that could cause confusion between newer agreements that aren't as pressing and older agreements that are). Once the room is ready (dug, cleared, and smoothed), then make it a meeting area, add a new location, add a temple, look through the list for the religion with the highest number of followers (remember that religions are colored differently from deities), and choose that. Ignore the individual deities. Then check the e try for the temple in the locations menu. If it’s the correct one (and the room isn’t yet valuable enough), it’ll mention the agreement. If it doesn’t mention the agreement, but does allow you to select a priest, then you still have the correct one (and the room is already valuable enough). If the room isn’t yet valuable enough, do whatever you need to increase it’s value and you should get a message in the announcements saying that the temple is ready for you to recognize a priesthood. Once you choose the priest (via the locations menu), the agreement will automatically be considered to be fulfilled.
Hope that helps!
Edit: added a slight bit more explanation…
Edit2: added a bit more clarification in places where the original text could have led to confusion.