It's a German expression. Mostly used to comment on a negative situation in a slightly disparaging way while recognising the negativity and futility. The closest English word is "well".
In Swedish, ”tja” is an informal greeting, and so is ”tjena”. A usual exchange at the checkout of my local grocery store would be:
”Tja!”
”Tjena!”
”Kvitto?” (Receipt?)
”Nej tack” (No thanks)
While trying not to make eye contact because we don’t do that here.
(Btw, the German and Swedish ”tja” are pronounced differently, so this joke works only in text.)