There are actually ways to become a software engineer outside of the traditional process of getting a computer science degree --> work at a software engineering internship --> get a job after graduation.
In my case, I was a teacher before I became a software engineer. I was lucky enough to join an early-stage startup where I could teach myself how to code and learn on the job under a mentor. However, my case is usually pretty rare.
If you decide to become a software engineer after already having graduated or already working in a different field, a very popular option is to enroll in a coding "bootcamp" to get that foot in the door. A bootcamp is a very condensed crash course in the basics of software engineering to get you ready for an industry job.