Sino-Vietnamese word from 社會主義, composed of 社會 (“society”) and 主義 (“-ism”), from Japanese 社會主義 (shakai shugi). The strictly adjectival use of this word, as opposed to chủ nghĩa xã hội (“socialism”, noun), is evident, although communist teachings may insist on some sort of politically poetic semantic distinction between the two. For example, that xã hội chủ nghĩa is meant to mean "yet to be fully socialist, but on the way there", while chủ nghĩa xã hội is "the ideology, or the full-fledged socialist reality". The argument is based solely on the order of the compounding elements somehow dictating the meaning of the whole expression, and whether xã hội comes first or last, with no basis on how either Chinese or Vietnamese works regarding head directionality. If this is considered as a purely Chinese/Sino-Vietnamese expression, then such interpretation is incorrect, as there's no *主義社會 chủ nghĩa xã hội in Chinese proper; if it is considered a Vietnamese expression (with Chinese elements), it would be analyzed as a compound of xã hội + chủ nghĩa, and its literal meaning would nonsensically be "doctrine society", with xã hội being the head element and chủ nghĩa being the modifier. Earlier adopters of the term, who were well-versed in Chinese learnings, evidently used it (although not exactly in a Marxist-Leninist sense as it's now used) as a Sino-Vietnamese compound with xã hội being the modifier and chủ nghĩa being the head.
Compare other pairs such as tư bản chủ nghĩa (“capitalist”, adjective)/chủ nghĩa tư bản (“capitalism”, noun), cộng sản chủ nghĩa (“communist”, adjective)/chủ nghĩa cộng sản (“communism”, noun), and phép biện chứng duy vật (“materialist dialectic”)/chủ nghĩa duy vật biện chứng (“dialectical materialism”).