I want to know how come Imam Ali lived his Life in Kufa and passed away in Kufa but Imam’s shrine is in Najaf. Who took Imam’s body to najaf?

Kufa is part of Najaf. They are joined to each other