And, as is sometimes the case, I'd say more and less formal, respectively.
'고통' is a Sino-Korean word and it means 'pain and suffering'. '아픔' is Pure Korean word means 'pain'.
Both mean the same. One can be written in Chinese letters whereas the other only exist in the Korean language.
More and more young generations prefer to use Korean words that only exist in the Korean language so for young generations, 아픔 is more frequently used.
고통: formal, more to do with written Korean, more likely used by adults, Japanese or Chinese can learn easily since they already have similar word in their own language which can be written in Chinese letters 아픔: informal, more to do with spoken Korean, more likely used by young, Even the northeast Asians need to learn from the scratch