How hard is it to tansfer majors as an undergraduate student in scool

It came to me that the chemistry major will be less competitive for me to get admitted to I guess compared to engineering.

Also, I was told that as long as you get all As in major subject in first year, it will be possible for me to transfer. Whereas applying to UIUC may get me rejected (possible)