The word translated as “day” in Genesis 1 is the Hebrew word yom. In this chapter, yom is modified by a number and used in connection with the word night and the phrase “evening and morning.” Each time yom is used outside of Genesis 1 in just one of these ways, it means a normal-length day. There should be absolutely no question that day means a literal, 24-hour day in Genesis 1 because that chapter uses yom with the combination of all three—a number, the word night, and with “evening and morning.”
Some Christians object by quoting a particular verse out of context. We often hear statements like, “Yes, but 2 Peter:3:8 says that ‘a day is as a thousand years,’ so the days of creation could have been long ages.” But why doesn’t anyone ever question what the word day means when Joshua and the Israelites marched around Jericho for seven days or when Jonah was in the great fish for three days? No Christian believes that the Israelites marched around Jericho for thousands of years or that Jonah was in the great fish for 3,000 years. Why? Because Scripture is clear. Yet, why do some Christians continue to question the clear meaning of Genesis 1? The answer is that they have been influenced by modern scientists who believe in millions of years. Thus, they have allowed man’s ever-changing opinions to have authority over the unchanging Word of God.
--Answers in Genesis staff (https://answersingenesis.org/days-of-creation/jonah-was-in-fish-3000-years/)