My best friend’s head would explode within 5 minutes of trying to program anything, so I’d tell him to run from both job opportunities for fear of his health.
More seriously though, as @colinthornton said, we don’t have much context as to the risks and goals you have, so it’s hard to pick and choose with the limited information you have provided.
From what you have given, there is actually only 1 option that has any sensible risk. There is risk in ignoring your offer from this company, and seeing if you can get into Google/Facebook. There is basically no risk in signing the job offer that is right in front of you.
Furthermore, there is actually nothing stopping you from working at Google/Facebook in the future. Technically if you get more experience now, you’d have a better chance later. It’s not like either of those companies are going to go anywhere, nor do I see any reason for your “opportunity window” with them to close.
The only “risk” you could have is “losing out” on a better offer from those bigger tech companies if you were actually able to get in. However who says you’d actually “lose” out on better ____ at a big tech company compared to a startup? It’s true a startup could crash and burn so there is the lack of stability, but if you’re starting out you can take more risk now than later. A startup will also give you more opportunities to grow and learn a multitude of things. A big tech company can do this as well, but you will be much more limited as there probably is already someone working on problem X.
I’d sign the contract, unless there are other red flags that would prevent you from taking this job offer that you didn’t mention. I assume the startup job is sensible and comparable to an entry level position at a big tech company across the board.