> something I don't really understand is that one nation killing another is more immoral than when a nation does this to their own domestic population.
I don’t know that anyone thinks a state’s violence against its citizens is less immoral. It’s more that countries are more hesitant to get militarily involved in the domestic affairs of another country because it would mean essentially declaring war against that state. But in a conflict between states, an outsider can more easily support one side militarily without declaring war against the other side.
It's also just a matter of logistics and support.
If Aliceville attacks Bobtopia, there are existing military and civilian organisations in Bobtopia that can take foreign aid and use it effectively. The population of Bobtopia are generally going to support their homeland or at least be neutral, and are available for conscription so they'll do all the dying and international forces don't have to.
If Bobtopia just starts massacring its own people, then:
A) You have to dismantle those same military structures along with many of the civilian ones, and you're now in charge of building an entire government from the ground up.
B) Some of the population, e.g. the ones who were doing the massacring, are now shooting at you instead. Some of their victims are probably going to shoot at you too.
C) You can't exactly conscript Bobtopians during a civil war you started and have them be an effective fighting force, because they're not unified, don't have a government, and often hate you. If you try to work with Bobtopian militias, you'll find yourself embroiled in Bobtopian politics.
This all holds true regardless of who has to declare war on whom.