Sort has two definitions, a noun meaning type or kind and a verb meaning arrange or organize. The verb showed up in the mid-fourteenth century and the noun a few decades after. Verb sort comes from the Old French sortir and classical Latin sortiri and noun sort comes from the Old French sorte and classical Latin sortem. Both sortiri and sortem come from another word sors, which means lot or fate, and can be traced all the way back to the Proto Indo European ser, the ancestor word for series.
Assort showed up in the late fifteenth century as assortir, from Middle French this time, although Old French does have the equivalent in assorter. Interesting to note: there doesn’t seem to be an equivalent in Latin, making French the creator of assort. Anyway, the a- prefix is from ad-, which means to-, and sorte is just kind or class, so it means something like “to classify”.
Consort showed up in the early fifteenth century meaning “partner”. It comes from the Middle French consort, Old French consorte, and classical Latin consortium, all with a meaning of partner or wife (and in the Latin case, also comrade and brother or sister). It’s a mix of the prefix com-, with, and sors, lot. When you have a lot with someone, they’re your partner : ).
These days, resort is more commonly a word for a vacation spot, but that meaning came around in 1754, four centuries after the other resort, a place to go for aid. It comes the Old French resort, resource or help, which comes from resortir—to resort. The prefix re- means again, shockingly enough. But here’s where things get interesting: sortir doesn’t mean type or class like it does above, but rather “go out”, and that sortir comes from the Vulgar Latin surctire and classical Latin surgere (surge). I can’t find evidence that sort sortir and resort sortir are related, and it kind of looks like they’re not.