To Anna's list I'll add a strategic point: if you're aiming at a green card in the medium term, evaluate your profile for EB-1A and EB-2 NIW now, not later. Both are independent of the employer and have no lottery, but they take several months to assemble (recommendation letters, articles, patents, talks).
If EB-1A/NIW is realistic, file I-140 in parallel with the move to STEM OPT. Once the I-140 is approved, any future H-1B extension is more reliable.
If nothing else fits, F-1 → degree program (master's or PhD) is a working strategy for additional OPT and more lottery attempts, but it's a 1.5-5 year investment.