This is a legitimate question. The claim that God could have created us in the state of heaven avoiding all this evil and suffering in the world is a nuanced version of the problem of evil. If we are going to heaven and our telos, our purpose and end, is to worship God and enjoy him forever in heaven then why didn’t God skip this earthly step? Surely, one may think that there’s a possible world in which we all exist in heaven. It’s my contention that the instantiation of heaven alone is not a possible world.
Aside from other theodicies and defenses such as soul-making, perhaps the most relevant to this question, I think it’s critical to understand that heaven isn’t some lone possible state of affairs by itself. Heaven is, necessarily, a contingent state of affairs. It’s a consequent, if and only if, there are prior antecedent conditions or states of affairs. Heaven is a result of our choices during this life. In other words, this earthly life is a necessary condition for heaven to be brought about (aside from the salvific will of the Father and saving power of Christ, I’m merely stating that this life must precede heaven.
This also leads to a very important question: How does God guarantee that there will be no evil among the saved in heaven? This is a very tough question and here are a few possible answers to consider.