A rebuild trusts every remaining disk, so I want to know that parity is good first.
Main > Array Operations > Check
Before you swap or upgrade disks, run a parity check and confirm it ends with zero errors. A rebuild reads every other disk and parity to calculate the new one, so a hidden problem turns into lost data. Check SMART reports for all drives first. Keep the old disk intact until the upgrade is confirmed, and never format the new disk when Unraid asks during a rebuild.
Further reading: Unraid docs: Replacing disks in array
Going deeper: Get the most out of Unraid: the settings worth changing, from shares to backups