Scripture may very well use language that suggests the earth is flat. But this does not mean it is teaching that the earth is flat because, as the Church tells us, Scripture is not intended to teach about physical science. You are drawing incorrect conclusions from what Scripture says because you are not taking its intent into consideration.
And I could speak about the flat open plains of the central United States even if I believe that the earth is a sphere. Use of the term "flat" doesn't necessarily have an absolute meaning but could be a relative term. Even if Scripture doesn't intend to teach about it, there can be no error in Scripture. But terms can be used in different ways. I can say that the sun moved across the sky and that does not by itself mean I'm a geocentrist (even though I personally am). Motion is relative, and so are various other descriptive terms that are not necessarily used in an absolute way. But let's be very careful with the "Scripture does not intend to teach about ..." terminology, for the modernists use the same expression to explain why there are historical "errors" (in their reckoning) in Scripture. While Scripture does not intend to teach about history per se, there can be no historical errors in Scripture. Period. When Scripture refers to the "vault" of the heavens, that could be a metaphorical term rather than the scientific description of a physical structure. Scripture could say something like, "And Jesus said..." but the words that follow don't necessarily have to be direct quotes (in our modern understanding) but could be paraphrases about the essence of what He said. That's not an error but just a different understanding of how the authors of Sacred Scripture made citations (direct vs. indirect quotations).
So we have to walk a fine line between being too slavishly literal and absolute on the one hand and attributing even historical or scientific error to Scripture.