Not necessarily. Comparison can reveal something you want or value. The important distinction is between using it as information and using it as evidence that your life is inadequate.
https://www.wisdom.vedaspark.com/blogs/why-do-i-keep-comparing-my-life-with-everyone-elses