What is the difference between (-2)^2 and -2^2

hierarchy is ... parentheses , exponentiation , sign

(-2)^2 = -2 * -2 = 4

-2^2 = - 2 * 2 = - 4 ... multiplication (exponentiation) before subtraction