I will add an answer that I hope will be beneficial.
Both words do not have the same meaning.
is something you say in place of where you would use “thanks for always taking care of me, we are indebted to you..ect..”
is used to basically say “good job, you worked hard ect..” and is generally a greeting you use with co-workers when they are leaving.
The main thing to keep in mind with the usages is the term Uchi and Soto. This means within and outside of. People within your group “uchi” (co-workers) you will use less formal language and also say お疲れ様です at the end of the day. Those who may work for a different company that you are doing business with are “soto” (those outside your group /non-co-workers ect…) you will say お世話になっております usually when you see them (more likely いつもおせわになっとります).
I have been yelled at a few times for not understanding uchi and soto properly. Such as talking about a co-worker to someone outside the company and adding -san when I should have used their name without the honorific as they are part of my group.