Each state has different requirements to establish residency. Most often, if you are dependent on a parent, then the parent must have lived in the state for 12 consecutive months prior to the first day of classes. The parent should do things to document the start of residency as soon as possible, like get a driver’s license, register to vote, sign a lease for a home or apartment, file a state tax return, etc., because you may have to prove when residency started.
Some states are strict and do not automatically grant residency just on the basis of physical presence, particularly if there is a suspicion that presence is solely for purposes of attending school and getting resident tuition. So if you know the state you would move to, you should research that state’s residency requirements beforehand so you know what is needed. They are generally posted on the website of any public university in the state and you can google them.