When a new switch comes up, it sends BPDU's with its own BID as root ID. When the neighbor receives this BPDU, it matches the BID with current root. If the existing root BID is superior, it'll update the new switch by sending this info in the BPDU & the new switch updates its info.
However, if the new switch has a superior BID than existing root then TCN will be flooded to update the network topology.