The starship on which Kirk served as a lieutenant before the Enterprise was the USS Farragut.
After graduating from Starfleet Academy in the top five percent of his class, Kirk was promoted to lieutenant and assigned to the Farragut. The ship was commanded by Captain Garrovick, under whom Kirk took part in a planetary survey and encountered a dangerous cloud-like organism.
The Farragut assignment became one of the defining experiences of Kirk’s early career. A large portion of the crew died during the encounter, and Kirk later blamed himself for hesitating before firing. The episode “Obsession” revisited that trauma when Kirk encountered the same type of creature again.
A common mix-up is the USS Republic, which was connected to Kirk’s earlier Academy training and field commission as an ensign. The Enterprise came later, when Kirk received command of its five-year mission.