That’s exactly the assign operator = does:
It replaces the value of the variable from the left side w/ a copy of the value from the right side.
But depending on the left variable’s datatype that value is interpreted differently.
If it’s a primitive datatype that value is interpreted as a number.
Otherwise it’s interpreted as the 1st memory address of an object’s contiguous memory block.