It is hugely wrong to suppose that there existed poor levels of sophistication in the ancient civilisations before the Roman/Greek era especially when it comes to calculations of the length of the year.
If we accept the Bible's own testimony, then the Pentateuch was written by Moses who died 1406 BC, having been very well educated in Egypt.
At the time of Moses the Egyptians used a 365 day, with no extra days to make up for discrepancies. (So New Year's Day would shift about a quarter of a day each year and circle round and back to the same day of the solar year after 1508 years.)
The Egyptians used the 365 day year for so long that New Year’s Day drifted round the solar year to cycle back to the starting point almost 3 times. They used it for almost 4500 years. https://pumas.jpl.nasa.gov/files/04_21_97_1.pdf
During the 40 years of wandering in the wilderness (Leviticus 18:3) after the Exodus, and more specifically when at the foot of Mount Sinai (Leviticus 27:34), Moses wrote Leviticus, in which was instituted a lunar/solar year. The Israelites followed a lunar calendar of 12 lunar months (354 days) but (the High Priest) added an extra lunar month to the length of the year if the last harvest of the autumn had not been gathered in by the fifteenth day of month 7 (Leviticus 23:39). So the Israelites between the time of Moses and the Captivity (about 600 BC) were not taken up with attempts to measure the length of the year by astronomical observations, in the way that other cultures around them were, but rather were guided by the timing of the last harvest of the agricultural year in the autumn. What they did observe was the moon to decide when each month began.
In practice obedience to Leviticus 23:39 would have resulted in the addition of 7 months in a 19 year cycle. The extra month could have been an additional month 7 (Tishri) so in a year where a month was added there would have been Tishri 1 and Tishri 2. Or, more likely, it would have been an additional month 6 where the High Priest would anticipate whether the harvest could be fully gathered in before the set date (15th of month 7), and if not he would add an extra month 6 (Elul) making Elul 1 and Elul 2.
So 12 of the years in the 19 year cycle had about 354 days, and 7 of the 19 years had about 384 days.
(A lunar month is 29.53059 days, so 19*12 lunar months and 7 lunar months is 6939.69 days. And 19 solar years is 365.2421875 * 19 = 6939.6 days.)
By the time of the end of the Babylonian Empire (539 BC) a system of adding 7 lunar months every 19 years had been formalised and adopted by the Babylonians to keep the year in step with the solar year to err by about 129 minutes every 19 years. ((A vast improvement on the Egyptian calendar which erred by about 4.5 days over 19 years.)) Thereafter it was adopted by the Jews from the Babylonians. For religious purposes the Jews still follow the same calendar. https://en.wikipedia.org/wiki/Hebrew_calendar
The 19 year cycle of the Babylonian calendar was itself following the calendar of the Sumerians from at least as far back as 2000 BC.
It is quite possible that some agricultural societies, well before the time of Moses, measured a year to be the length of time between one annual harvest and the previous one.
The question about the book of Genesis is how did Moses produce it? Did he receive all the information by a direct revelation from the Lord, or did he receive all or some of the information from previous sources (which we can assume were themselves writing under divine inspiration). If he received them from inspired sources then we would need to know the length of a year understood by those original sources.
In addition to this we do not know if conditions before the Flood were precisely the same as they are now. God could have used a natural cause to bring about the Flood which could have had other consequences as well such as the earth's distance from the sun and the orbit of the planet. Or God could have judged mankind with other changes to the planet by a direct Divine act. We do not know, unless Scripture tells us, if the earth's orbit and the length of the year were different before the Flood, though it is difficult to imagine such a difference would be anything more than a few days per year.