Perfection is often based on the desire for recognition by others.
This can be transferred to one's own self - Self-esteem depends on the achieved perfectionism.
The unfortunate thing about it is that the perfectionist is less likely to be satisfied.
It is created through aims that shape the person to whom it is aligned. For example, to arrange everything exactly, to eliminate the smallest mistake, to generate a control compulsion, etc.
Ultimately, something that can limit the quality of life. In addition, it can cause disease because goals are repeatedly not achieved.
You could solve the problem by being aware of what you are doing and trying to find the reason why you do that - and then working on that goal (creating a new goal).
The drive for perfectionism will often have formed in the growth stages, or could be innate.