Hi - I received earned income from foreign source of $36k. I paid $15k in foreign tax and got a refund from the foreign gov of $5,7k. How to I report this in my return?

Based on my current W2 details, I'm expecting a $2.6k refund prior to adding the foreign income info. How does this affect my return? I currently have the foreign income under the Deduction & Credits section and it currently says " $5,970" as foreign tax credit. I am not sure if I'm doing this wrong