Like terms are terms whose variables are the same.
So, if my variable for the first term is x² then the the variable for the second term should also be x², similarly, if the variable for the first term is u⁷ then the the variable for the second term should also be u⁷. Only then, the terms will be considered like terms.
Eg: 56t⁴, 6t⁴
-g², -109g²