Don’t get it twisted. Socialism is an economic system.
It is conceivably compatible with a republican form of government - I.e. representatives of the people could nationalize vast swaths of the economy. It would be a nightmare for our country but it’s not, philosophically speaking, incompatible with our govt.