is a 接続詞（せつぞくし） (conjunction) in Japanese that is a combination of the noun, ところ ‘place’, and the 接続助詞（せつぞくじょし） (conjunction particle) が. It is used to highlight that (A) was expected, but the unexpected result (B) occurred. It is usually translated as ‘however’, or ‘despite that’.
is most often used at the beginning of a new sentence, before highlighting something that is contrary to what was described in the previous sentence.
I had to wake up early today so I went to sleep at 9pm. However, my alarm didn't go off, so I overslept.
I bought a new washing machine. However, it was so big that it didn't fit in my house.
This use of が in Japanese is referred to as 確定（かくてい）の
逆接（ぎゃくせつ）, which basically means ‘a contradictory conclusion’.
highlights a result that is unexpected, it can only be used for things that are beyond the control of the speaker. However, if the speaker is trying to do something, but assumes that their attempt may result in failure, ところが
can be used to show that they were unexpectedly successful.
I thought my friend was not going to like it if I asked him to help me with studying, however, he did so without hesitation.
Sometimes, ところが is referred to as a 接続助詞（せつぞくじょし） (conjunction particle) itself, disregarding the combination of ところ and が. This is similar to ところで, another conjunction particle that has a slightly different meaning, and is frequently translated as ‘by the way’.