They both mean country don't they? I saw this phrase: 国家公安局部長。 When I looked it up 国家, the definition was just "country". So I'm not understanding the nuance between the two words.
I am sure someone could give a more comprehensive answer but it is usually the same as the difference between nation/state and country in English eg
警察国家｜a police state
福祉国家｜a welfare state
国 also has a few "domestic" uses, which I imagine go back to the time when people in Japan rarely travelled overseas and they might refer to areas of Japan as "countries" (this is somewhat paralleled in other "nations" such as the UK where people in regions such as Cornwall might see themselves apart from the rest of the nation, even though they are not referred to as countries such as Scotland or Wales) hence in Japanese :
国の習慣 = local customs
国へ帰る : can mean ”go back to one's birthplace/ふるさと [古里／故郷]”
And of course there are parts of Japan with 国 in the name such as 中国 ＆ 四国