There are pitfalls to avoid in world building, but the most common is the info-dump in the beginning. Resist the urge to include an explanation of everything and anything about the fictional world you’ve created and the challenges your character will face.
Now, I’m not saying don’t write it – do write it, hold onto it for reference, keep a “cannon” of your world rules and creatures and cities and locations and histories. Too many beginning authors want to skip this, and write the story, and only the words of the story. They don’t do the “back” writing that’s necessary to build a full world. Please, please don’t make the mistake of thinking everything you write, or even 1/5th of it, will end up in your book. You’re going to write 9/10s more than what you will use in your book and that’s OK. Necessary, even.
Part of the joy of reading science fiction and fantasy is the discovery of a new world and reveling in the escape to, and the sense of wonder about, that world. Once you lose that, you’ve lost the “magic” in your prose.
I always go back to what I love to read. I love to read books in which I can discover, over 300-400 pages, the world of the text. It comes out in dribbles, and only when it’s appropriate. It builds, page-by-page, slowly and intensely, and the author never comes right out and states anything. The text assumes I know and understand as much about the world as the MC, but only as much as the MC. If the MC is a child, age 10 to 15, there’s a LOT that’s left unknown.
Allow your reader to discover, just as your MC discovers, the world you’ve created. Don’t lay out the rules – let your MC and the reader discover them together. It will bond them emotionally. They can’t bond over this discovery if you lay out the rules for them, in advance.