The first contact with the Cardassians wasn't until the 2320s, unless you count the exiled Cardassian poet who spent some time on Vulcan during Tobin Dax's lifetime.
I know there is a comic that focuses on that, but where in "canon" does that little gem crop up?
First Contact between Cardassia and the Federation in the JJverse was a lot earlier than the 2320s as Uhura asked for a Cardassian something-or-other while at the bar in Star Trek 09 so who's to say it didn't occur earlier than the 2320s in the Prime-verse.
In one of the
Vanguard novels, set in the mid-2260s, it's mentioned that Starfleet Intelligence has recently become aware of a "new" alien government nearby, the Cardassian Union.
Also, Margaret Wander Bonnano's movie-era novel
Unspoken Truth, set in 2286 (the same year as
Star Trek IV: The Voyage Home), it's mentioned that the Starfleet captain of the science vessel that Lt. Saavik signs onto hails from a Federation colony world on the Cardassian border, and whose settlers were forced to toughen themselves up, due to facing the Cardassian threat on a daily basis, etc.
So there definitely was
some knowledge of them as far back as Kirk's 5YM (and well into the TOS movie era), although of course in the Prime Universe, the Federation didn't make "official" first contact with them until the early 24th century or thereabouts...more likely "proper" open diplomatic relations in this case, supplanting the "unofficial" border brushfire-skirmishes that had been the norm for several decades by that point.