I agree with Philip Kendall about how to phrase the way the first two jobs ended, but I disagree with putting it on your resume. A resume/CV is about the work you did and who you worked for, not why the work ended. It's a description of your skills and experiences. It's there to get a potential employer interested in you. Any questions about details of the work and environment should be left for the interview.
I've experienced much of what Thomas Matthews describes, but there's a lot more to it than that, even. My first job as a software developer pushed me out (to put it kindly) after 4 years. I was getting great reviews until that last year, then nothing I did was good enough even though I was producing more and better code than ever before. But their goalposts drastically changed and I asked too many questions about it.
I've also worked a contract that ended because of a mass layoff of several hundred people. Another contract ended because of budget restrictions. One job ended because I refused to take responsibility for things I had no control over.
In my previous "career" in computer repair, I spent 15 years getting about 8 years worth of work due to a massive saturation of computer techs in the area. Many of them were barely worth calling techs, since they didn't really know what they were doing, so they soured most employers on hiring directly. Many other computer techs were engineers that took that computer repair work in between contracts at the major employer of engineers in the area. This also soured employers on hiring directly, since they would only get these people a few months before they left for their "real job".
I've ended up on more contract/temporary jobs than I can remember. This type of short term work is becoming much more common and due to employers, rather than employees. You've probably heard of gig worker or gig economy. Not all of us working "gigs" want to be there. I'd much rather have a direct hire, long term job than a contract. I only take temp-to-hire contracts, but I've found out the hard way that some employers never intended to convert the position to direct hire, they just want to look better to potential employees, as I've commented on other answers here.
Reasonable employers understand that the job market is extremely volatile, especially the past 2 years. People job hop for a lot of reasons, and some excuses. One of the biggest reasons is to get higher pay. When I left my first software dev job, I got about a 30% pay raise. When that contract ended unexpectedly, my next contract was about another 20% raise. That converted me to a direct hire at another significant raise. In 18 months, I increased my original underpaid salary by roughly 2.5 times. I feel as if I got lucky on some of that, but I also realize that I was getting severely underpaid for that first job and I'm now being paid more along the lines I should be for having nearly 10 years professional experience, not to mention the 20 years of personal experience and script writing/website building/etc. I did for my computer tech jobs. But I'm getting off topic.
In the end, you being a junior employee at the beginning of your career shouldn't be held accountable for how your jobs ended. Too many employers will cut staff for pretty much any or no reason. And most employers will cut the junior employees before the seniors due to experience, longevity, willingness to be subjected to a toxic environment, good 'ol boys clubs/company politics, company specific subject matter expertise, company policy, or 1000 other reasons.
Definitely don't put the reasons for the end of a job on your resume. Leave that for the actual conversation of the interview. That way you can briefly elaborate on the situation, if it actually calls for it. Many of my reasons for leaving jobs is "End of contract", which I state just like that. And when an interviewer says that I've had a lot of contracts, I mention how often employers will only hire through a temp agency and that I'd rather have a direct hire position than a contract. So, state the reasons as simply as possible with as positive an angle as you can truthfully put on it.
Interviews are there for you to gauge the employer, too. Make sure their work environment is good for you and that you aren't being set up for failure. Interviews are absolutely a 2 way street. They are not just to test you for a good fit for them, but also to test them to see if they are a good fit for you. I've talked to recruiters that set up interviews for me to let them know that even though the interview went well, I wouldn't be interested in working for the company or that specific department. I didn't even wait for a job offer or rejection letter, I made sure to tell them my decision first. I've spent too many years working for bad managers, doing work that didn't have much to do with my job description, being treated as a lesser employee for being a contractor, and other bad situations to worry about hurting the feelings of people that won't even consider my feelings in their daily abuses.
Many people will likely disagree with what I have to say here, but there's a lot of research out there (more than I can reasonably list here) that says employees need to take more control over their careers to tell their employers what they will and won't do, as well as making sure the employee gets the compensation and work-life balance they deserve. A huge part of the recent Great Resignation is due to employees finally feeling like they have the freedom to quit the jobs they hate and find better jobs. With covid putting pretty much every industry on it's head, the job market is in a huge amount of churn right now, so people leaving their jobs is pretty common right now, not forgetting the massive unemployment due to layoffs during 2020 because of Covid-19.
So really, your situation isn't dire. It's a lot more common than you've probably been led to believe. Don't go into a job interview thinking you have something to hide. Employers can sense that kind of thing and many will dig until they find your insecurity. Some will simply take your insecurity as if it's about your skills, rather than your "unstable" job history. Been there, done that. Go in with confidence about your skills and yourself. Talk about what you can do for them and keep in mind anything you won't do. I've had to add something as "simple" as an open floor plan as a reason for not working for a company. I get far too distracted by other's conversations for me to effectively work in a situation like that. If I had taken that job, I'd have been setting myself up for failure, so know yourself, your limits, your strengths, and work from there.
Good luck and I hope everything works out for you!