Young earth creationists believe that the earth is between 6000 and 12,000 year old typically, but we can observe the light from stars that are more than 6000 to 12,000 light years away. That means these stars existed before God created the universe.
One YEC attempt at resolving this issue is to suggest that the speed of light was dramatically faster in the past than it is today. There is a problem with this though as I posted in another thread:
If the speed of light was significantly higher in the past than today, there would have been a corresponding increase in energy released by matter (E=M*C squared.) All stars require the reaction of matter in order for there to be the fusion that makes them work. If the universe was as young as they suggest and we apply Einstein's equation to our sun, then 6000 years ago our sun would have put out about 800 billion times the energy it does today. Too toasty for life.
I once heared a YEC come up with the excuse that God just created the light beams "on their way" , so that it would "look" as if that light had been traveling all that time.
To be perfectly honest, I consider such to be the most sensible excuse. It's an exercise in futility to try and make creationistic nonsense match science, because it's simply not going to happen.
So the easiest way out, is to simply invoke magic. Some type of "last thursdayism", which is the idea that the universe and everything it contains, including our memories of having lived our entire lives, was created just last thursday. But then instead of last thursday, it was 6000 years ago.
If I were a YEC, i'ld invest heavily in such invoking of magic. It's the only real way you can marry such nonsense with observable reality. Take Noah's ark. I don't get why YECs insist on trying to match that with scientific evidence. It's a lost cause. It's not going to happen. Geology will never agree - the evidence just isn't there. Even only boat-wise, it's obvious bs... wooden boats that big just aren't sea worthy. Then there's all the logistic problems of 8 people having to take care of that many animals. It's just not realistic.
Unless you invoke magic.
"god put the animals in hibernation, so they didn't have eat or poop".
"god zapped the animals unto the boat, so kangaroo's and pinguins didn't have to cross entire oceans"
"the boat was made of magical wood which ignores the rules of physics so that it could float"
"god cleaned the earth of all the damage and sediments, making it look as if the flood hadn't occured"
I mean.... it's religion... you're already dealing with faith based bare claims from the very fundamental core going forwards. So why go through the trouble of trying to marry it with observable reality.
If "faith" is good enough to believe in god, I'ld guess that "faith" is good enough to believe in impossible boats and non-existing floods as well.