My understanding is that most educated people, even during the Middle Ages, were aware that the world is a sphere. Certainly the Muslims were. The standard cosmography was that of Ptolemy, in which the Earth was the innermost sphere.
It is pretty difficult to be an intelligent, observant seaman and not come to this conclusion. The high mountains become visible first as you approach land, the hull of a boat disappears with distance, then the sails, etc.
I believe the flat earth idea was pretty well limited to the uneducated, although that was the vast majority of the population at the time. For instance, Columbus never worried about sailing off the edge of the world, and there is no evidence that any of those he applied to for funding were concerned about it either. They worried only about how far he’d have to sail to get to Asia, based on Ptolemy’s estimate of the size of the Earth, which turned out to be close. If the Americas hadn’t been there, Columbus and his crew would have all died long before they reached the Indies.
the standard idea at the time was a flat world.That's not true. That idea that Columbus disproved that the world was flat doesn't occur in anything contemporary with Columbus, it was made up by some isolationist crank in the 19th century.
Greek mathematician Eratosthenes calculated the circumference of the Earth very accurately around 240 B.C. His figure of 25,000 miles was off about 100 miles from the modern calculation. There’s no question that educated ancients knew the Earth is a sphere. Eratosthenes was head Librarian at the great Library of Alexandria. A great deal of knowledge was lost when it was burned but Eratosthenes’ measurement was preserved and widely known.