You get confused by viewing the evaluation of an expression as a matter of gradually replacing symbols in a formula by other symbols. Doing so is extremely convenient and a great timesaver, but only as long as you know where you need to insert parentheses in the right places such that you won't get nonsense out of it. And the way to know that is to know that symbol manipulation is not the real meaning of the expression.
Rather, an expression is a recipe for which calculation you perform. When you have an expression such as
$$ -5x^2 + (x+y) $$
this is really nothing more nor less than a compact way to write down these instructions:
Find the value of $x$.
Raise the result of step 1 to the second power.
Multiply the result of step 2 by five.
Take the negative of the result of step 3.
Find the value of $x$ (once again!)
Find the value of $y$.
Subtract the result of step 6 from the result of step 5.
Add the result of step 4 to the result of step 7.
The result of step 8 is, by definition, the value of the entire expression.
Now when you actually follow the recipe, it is clear that in your case with $x=-2$, the result of step 1 becomes negative two, and therefore the result of step 2 becomes positive four. The result of the value of $x$ is always what is squared in step 2.
So if you want to use symbolic rewriting to keep track of where in the recipe you are, you need to be sure to insert parentheses in the expression as necessary such that the steps of the original recipe what we haven't done yet still stay the same.
If you just replace the symbol $x$ textually by the symbols "$-2$" and get
$ -2^2 $ for $x^2$, you've introduced a "negate the result" step after the "take the square" step, so you rewriting does not preserve the meaning. In order to preserve the meaning we need to insert parentheses to get $(-2)^2$.
This is the point of parentheses: To make clear how the calculation steps fit together and which results are input to which other steps.
Part of the source of the confusion here is that we don't have a single symbol that means "negative two". If we want an expression for that number, the best we can do is to write it $-2$ -- but that notation is really a two-step recipe:
Take the number two.
Take the negative of the result of step 1.
Inserting this recipe in place of all of the "find the value of $x$" in the original one means that we now have steps from different recipes in the same list of steps. So in order to write down those steps as an algebraic expression, we might need to write new parentheses to clarify the relation between steps that came from different sources:
$$ -5(-2)^2 + (x+y) $$
(All of the PEMDAS stuff that some school teachers place an inordinate importance on are not more than the convention for how to get from the algebraic expression to a step-by-step recipe. Even though the rules say "parentheses first", nobody cares whether you actually carry out the addition in step 8 before you begin steps 2, etc -- the addition will give the same result no matter when you carry it out, as long as you're clear on which numbers it is you add. The importance of the parenthesis in the original expression says that the result of adding $x$ and $y$ is one of the inputs to the other addition, and not the other way around.)
2² = 2*2 = 4
,-2² = - 2*2 = -4
,-(2)² = - (2)(2) = -4
and(-2)² = (-2)(-2) = 4
. This might be wrong, but this how I learned it from different YouTube channels. $\endgroup$