Understand what separates the successful startup from the failed one you're in, was it the product, sales pipeline, marketing, org structure?
Essentially perform a diff between the two companies and root cause what you'd improve on and other structural things you'd change the next time around.
I'm sure you've acquired experience in the vertical that your startup was in, recoup of the time and energy investments made there.
Lastly all the best, this happens to many early employees and founders.