I'd say take a startup. Those early companies don't have a lot of staff so you can try lots of things, wear lots of hats. Good experience. Take cash, don't get played by options/equity. When you find the hat you like move into a more stable role.
i joined as founding engineer as my second job, 2 years after college. The founders were the same age which I think let them consider a young founding engineer. It worked out for me and I think if you have the opportunity then it is a great time to take the plunge. Knowing what I know now I would likely not take the same role at 30 due to lifestyle requirements (have wife and house now, back then I was paying very little for rent with roomates and had no issue with 12 hour days. I think the risk can make sense early in your career but most founders probably dont want to risk it on an untested dev with sub 3 YoE.