If you transfer from community college to four year only one year can you change your major?

Since I would be accepted to the school only after one year in college, is it allowed to switch majors once you are accepted into the four year or are you only accepted on condition of not changing major? I am wondering since it seems like you could just claim you want to study some non-popular major and get accepted and then just switch to what you really want to study.

I have known students who changed their major in the middle of their 4th year at university. There are however two downsides of changing majors:

Some universities restrict students from taking on particular majors. In other words, in some cases you need to apply and be accepted into a particular major. If you are not accepted then you might not be allowed to change into that major.

In many cases, if students change their majors late in their university years, it might take extra time to graduate.

Usually schools are aware of the trick of applying to an unpopular major and then changing to a more popular major. As such, there usually is some way that they prevent this from being a useful strategy.

What I don’t understand though is if since I would be applying only after one year would I be being accepted into the general school, as in not a particular department for my major? If so, it seems you should be able to switch majors before applying for a specific school within the school I want to transfer to, but I’m not sure, which is confusing me.