in short, the natural sciences or electrical / mechanical engineering for the win.
i’d advice a younger self to major in mathematics, physics, mechanical, electrical or chemical engineering, (accounting even) and just study the topics below. why? well, simply because all it takes is a simple job search to realize that all the afformentioned majors can easily merge into software engineering roles (and often do and perform really well), but you as a cs degree holder cannot do the same. a bit more research and you will realize that there are laws/policies that dictate the requirement of ABET engineering degrees and accounting degrees for the Certified Public Accountant and Professional Engineer designations. yes, you might say “i wouldn’t like to do any of those jobs anyway.“, but consider
those majors often do want to (and eventually do) merge into positions you’d be interested in. so, yeah. you’ll be competing with them at some point.
name your favorite programmer/swe, i can almost guarantee they did not major in cs, or at all. richard stallman? physics. jeff bezos? electrical engineering. the zuck? drop out. bill gates? started as pre-law, but took a lot of maths and dropped out. john carmack? drop out. elon? mechanical engineering. linus torvalds? well he actually did major in cs. but anyway…
why would you not want to be as nimble as possible? all those majors are, why not you? do the bit of extra work. study the topics below. thank yourself later. (and yeah, could be worse as is you can merge into other fields. just not those fields)
a cs degree does not remotely guarantee that you will become a good problem solver.
you’ll have enough opportunities to write software when you join the workforce. spend the time to take more math courses.
ps. same goes for all other X science, Y administration and Z management degrees, and dont even get me started on cybersecurity or masters in cs degrees.
stay tune for a structured list of sources where you can study these cs topics.