What happened to all the people who died before Jesus came?

They absolutely could go to heaven. Let me explain.

I actually had to look into this, so I’m glad that you asked. You know, of course, that salvation for us comes through faith in Jesus Christ dying for our sins and raising again, so that we could have eternal life. Well before Jesus came, people were saved by their faith in God. In Romans 4 Paul talks about this very thing. (I will not include the entire chapter in here so I urge you to follow the link and read it yourself!)
A mistake many people make is they think the people that lived before Jesus were saved by their good works. This is very clearly not the case. Romans 4:5 says

“But people are counted as righteous, not because of their work, but because of their faith in God who forgives sinners.

Paul is talking about all of the people who have lived and will ever live. He is not just talking about people that lived after Christ died. Paul says in Romans 4:20-25

“Abraham never wavered in believing God’s promise. In fact, his faith grew stronger, and in this he brought glory to God. He was fully convinced that God is able to do whatever he promises. And because of Abraham’s faith, God counted him as righteous. And when God counted him as righteous, it wasn’t just for Abraham’s benefit. It was recorded for our benefit, too, assuring us that God will also count us as righteous if we believe in him, the one who raised Jesus our Lord from the dead. He was handed over to die because of our sins, and he was raised to life to make us right with God.”

He’s talking about here how Abraham was counted as righteous because of his faith in God. Jesus had not come yet but we know Abraham went to heaven from other verses in the New Testament. We even see Jesus talk about Abraham being in heaven when he tells the story of Lazarus and the rich man in Luke 16:19-31.
And to address your last statement/question, “Even though their sins hadn’t been paid for?”, when Jesus died on the cross it paid for everyone’s sins, past, present, and future. 1 John 2:2

“He is the atoning sacrifice for our sins, and not only for ours but also for the sins of the whole world.”

So anyone who had faith and trusted in God before Jesus died, still were able to go to heaven because Jesus paid for all of their sins. And everyone who has put their faith and trust  in the fact that Jesus died for their sins, since Jesus’s death and resurrection, have gone to heaven too. Awesome news! Someday we will get to meet great men who had faith in the Lord like Abraham, Joseph, David, and Solomon! I can’t wait – Tyler J. Collins