I’m piling on, but this needs to be deeply researched for each and every school.
At some you can change freely. At some you can change, but your ability to have gotten that major n the first place may be taken into account. This prevents what’s referred to as back dooring. At some majors like CS are completely blocked.
For a truly undecided student who may want something like CS, engineering or business, school choice will be paramount.