I would not view being a contractor in the way you describe as a yellow flag, but that's not OP's situation. OP looks like they were relatively inexperienced, had never held a job for 2 years. Even if OP didn't mention they were trying to convert to FTE in these roles and it didn't happen, the descriptions of them tell me that's probably what's happening.
The software dev job before that I had for 3 years. I just don't include it on my resume anymore, for length/ageism reasons (also it was VBA/original ASP, which I never want to touch again).
I'm not sure where you got two temporary contracts, I've only ever had one non-FTE job, and that was the 9 month one, and even then I was an employee for TEKsystems. They would have happily put me somewhere else (hell, they still reach out to me a couple times a year), but I really didn't enjoy my experience, so I didn't continue with them (I was actively interviewing for other jobs near the end of it, the contract ending was a surprise but also a relief). The benefits were the worst I ever had at any company before or since (poor medical insurance, zero PTO/paid holidays or any other benefits), and I got a 25% raise at my next company as a FTE, so it's not because I got better pay than elsewhere.
And if we go before that, I had a fast food job, a retail job, a warehouse job, a stocking job, a data entry job (all of these were at least a year, up to 2) hell, I even helped my dad with construction and apartment maintenance when I was as young as 14. But they're not software-related and basically ancient history at this point, so they haven't been on my resume for about fifteen years now.
I've seen this idea before but it seems like a very odd prejudice to me. Is it a particularly US-centric thing or something? Here in the UK a lot of good people in tech do independent work at some stage in their careers. Salaries for permanent employees tend to hit a ceiling. Contractors and freelancers can potentially price based on value and charge significantly more if they're worth it.