When "has" is functioning as a main verb, it isn't contracted.
It has four legs
The verb is "has". That is the main verb. The contraction is not possible.
It has been moved.
The verb is "has been moved", and "has" is an auxiliary. The contraction is possible.
It has got four legs
The verb is "has got", and has is an auxiliary. The contraction is possible.
This is how we tend to use contractions when speaking fairly carefully. When speaking quickly, "has" as a main verb tends to be reduced to /əz/ (especially in British accents) This might be written as "'s". This is probably not a style that English Learners need to emulate in writing.
With negative verbs, the contraction "It hasn't been moved" is far more common than "It's not been moved" (this is perhaps typical of Scottish dialects). As a main verb, do-support is used: "It doesn't have four legs".