Yes, exactly. As you say, it's the difference between the comma and the 'dot' ( full stop/ period). It depends whether you have one sentence or two.
'Seven of them are located in Bangkok, the capital city.' is a self-standing sentence. It refers back to the previous sentence, but it is only dependent on the previous sentence for its meaning, not its grammar. Grammatically, it is independent.
There are ten universities in Thailand. Seven of them are located in Bangkok, the capital city.
'Seven of which are located in Bangkok, the capital city' is not a sentence and it cannot stand alone. Grammatically, it has to be part of the sentence beginning 'There are ten universities in Thailand'.
There are ten universities in Thailand, seven of which are located in Bangkok, the capital city.