There is no good reason from the text to insist that a ‘yom’ without a Sun - evening and morning no less - was exactly 24 hours.
A morning and an evening without a Sun doesn't sound like a literal “day” to anyone thinking logically.
Ah ... but there is your logical fallacy. You ASSUME that the evening and morning before the sun was created MUST mean something else.
What was the source of light for the days before the creation of the sun?