It’s classic writing advice: Write what you know.
Unfortunately, if you want to write about a fantastic monster, a human transformed into a dragon, or an alien xenoarchaeologist uncovering ruins of a strange race from somewhere called “Dirt”, this isn’t possible.
In which case, there’s another piece of writing advice that I’ve found much more useful: Know what you write.
Research. Do lots and lots of research. Libraries are fun! Maybe there’s no way to research alien xenoarchaeologists, but there’s plenty of info on archaeology out there. Poke it until you find an approach your alien culture would use. It doesn’t have to be the best, or even mostly scientific. You might have the alien equivalent of Heinrich Schliemann following the works of Homer to find Troy! It just has to be based in reality, so the readers have a solid footing when they suspend their disbelief. Everything else fantastic in the story will be that much more plausible because of it.
Besides, you never know when a little research will provide just the hook your plotbunnies need to go from “okay, another space opera” to “ooo, this is going to change everything that comes next!”
Like that iron knife in Tutankhamen’s tomb. Meteoric iron.
Hey, maybe Daniel Jackson was onto something….