I wanted to know the nature of the Imams after Prophet Moosa that the Quran references in verse 5:12. What role did these Imams play, and can we connect that to our current 12 Imams? Was Hazrat Moosa's 12 Imams also hereditary line like ours?

The nature of the Imams in Qur’an 5:12 is different from the nature of our beloved 12 Imams. Our Imams are all children of our beloved prophet whereas 12 of prophet Musah are 12 sincere and pious leaders from different tribes of that time. They were those who knew Allah than others within their tribes. Their roles were less complicated than that of our beloved 12 Imams