Why would it be a red flag? Many companies have horrible cultures and dysfunction and you only get to see it after starting full-time. It’s very common to realize you are not compatible with the particular dysfunction of a certain job and need to leave even just after a few months just for basic reasons of taking care of yourself. This can easily happen at multiple consecutive jobs.
I’ll even go further and claim that in tech and especially in start-ups, hiring is deliberately deceptive. As a candidate you are at a severe information asymmetry disadvantage when you have to decide to join, and companies very often manipulate that situation to bait and switch on overqualified candidates, lie about or hide financial details, emphasize the wrong things to create halo bias in your decision making, etc.
Given just how egregiously bad companies are, just in general behavior, I don’t see why it’s surprising or controversial or “a sign” of anything to see a job history with a lot of short stints.
In fact, if a hiring manager or HR staff looks at a resume with short stints as a bad thing, that actually seems more like an indicator that the company is bad. They are thinking, “this person doesn’t patiently swallow company bullshit for keeping up appearances on the resume... they’ll never stick it out in our horribly toxic culture...” and it’s very telling that companies think this way instead of fixing their bullshit and being realistic about candidates needing to hop between jobs when company culture is bad.