It's not the same for all languages. Is it the same for C-style languages, like C++ and such? Normally, yes.
Importantly, x doesn't reference a "memory location". It just represents an object (in C parlance, meaning "thing that you can change and pass around") that has a particular value. When compiled that x might be stored in memory, in a register, or optimized out and eliminated entirely.
For example:
int x = 1;
int y = x + 1;
int z = 4;
printf("x:%d,y:%d\n",x,y);
Here y will be 2, that can be determined at compile time, x will be 1, and z doesn't matter so it might even get deleted. y isn't computed based on x, it's computed based on static analysis of the code where the compiler rightfully asserts that it can only ever be 2, so the x factor is optimized out.
When you change y you're changing a separate thing, it has no effect on x unless you explicitly make that assignment.
This is not true in a language like C++ where references exist, as those are like variable aliases:
int& y = x; // Same as `x`, where `y` is just another name for same
Note that this is limited as well, like if int y = x + 2 you can't use references, as you're not referencing a variable. That's an expression.
In some languages an assignment like this is treated more in the mathematical sense, as in y is always x + 2 depending on whatever value x has at that moment. Functional programming languages tend to employ this model, but the specifics differ considerably.
What you're probably asserting is "Do variables work like this in imperative programming languages?" where the answer is normally yes.