I recently heard someone make the claim that humans have known that the Earth was not flat since at least Ancient Greece and that the Catholic church never said otherwise and never tried to suppress anyone for saying so
The ancient Greeks certainly understood the earth was round from around 400 BC. That's fairly straightforward, in fact around 200 BC Eratosthenes, a Hellenistic scholar in Alexandria, famously came up with a pretty good estimate of the Earth's circumference (you'll sometimes see people describe it as a nearly perfect estimate but it was likely only "pretty good." He used an archaic unit called a stadia which wasn't standardized so we don't know exactly what his estimate was). Now, 2500 years ago is a long time, but to say "almost always," well anatomically modern humans have been around probably more than 200,000 years so...
Anyways, to give some sources, here's u/KiwiHellenist describing the impact this understanding had on exploration - for example in the first century AD Pliny the Elder describes devices and methods for measuring your latitude (note the question is misinformed - Eratosthenes didn't figure out the earth was round, that was well known).
Edit: I want to draw your attention to Kiwi's link to their own comment in this answer, it goes into more detail. Also in case you're dumb like me, Hellenophone isn't a name, it means Greek-speaking :)
There's another part of your question, the Church. I'm going to make a bit of a presumption here, a lot of people ask about Galileo and the church, and seem to be under the impression Galileo got in trouble for saying the earth is round. That's not right, the shape of the earth was not in doubt by then. The debate was over if everything orbited the Earth (geocentrism) or the sun (heliocentrism). The church's official stance was geocentrism, but even then Galileo wasn't forbidden to discuss his theories. Long story short, the Pope asked him to not be a dick about it, and he was a dick about it, which is what he got in trouble for.
u/DanKensington discusses that here and links to more detailed answer (note again the misinformed question, Galileo was certainly not killed over anything)!
Yes, this is entirely the case -- I wrote about this in a previous answer. A spherical Earth isn't what got Galileo into trouble, or even his theory of heliocentricism (that the Earth revolved around the sun); the issue is that he was a massive dick to several Church leaders. But even common people in the Middle Ages knew the earth was spherical.
Follow up question; It's pretty well established that ancient Greek scholars deduced that the Earth was round, but how quickly and how widely did this information spread? What percentage of Earth's population would have believed this knowledge at any given point? We know there are still flat-earthers today, when did this become a fringe belief?