There is no contradiction.
1. The second ayat indicates the time of our prophet where he is the prophet and ulul amr too. He is holding both responsibilities. After him ulul amr are responsible.
2. According to Tafseer namuna: the second Ayat is about the rulings and ahkam. For this Quran and sunnat are the base. We must refer to them. The responsibility of ulul amr is to implement the rulings and ahkam.
That’s why the word ulul amr is not mention in the second ayat.
Allah is all knowing