Final answer:
Root Guard is the STP optional feature that prevents a newly connected switch from taking over as the root bridge by blocking the port if superior BPDUs are received, thus maintaining the network's current root bridge.
Step-by-step explanation:
The STP optional feature that prevents a newly connected switch from becoming the root bridge is Root Guard. This feature is designed to maintain the current root bridge as the preferred root bridge in the network. When Root Guard is enabled on an STP-enabled switch port, it prevents external switches from influencing the root bridge election process. If a Root Guard-enabled port receives superior Bridge Protocol Data Units (BPDUs), which suggest another switch is trying to become the root bridge, the port will be placed in a root-inconsistent STP state, blocking traffic until the superior BPDUs stop.
BPDU Guard, on the other hand, is designed to protect the network from configuration problems caused by reception of BPDUs on ports that should not be receiving them. BackboneFast and UplinkFast are features that aim to speed up the convergence time of the spanning tree but do not directly control root bridge selection.
Learn more about Root Guard