The main would be who and the verb. The subordinate would be the main and what they are doing.
For example the second one:
We waited until everyone arrived.
Ask yourself what are they doing? They’re waiting so the main answer is: We waited
What are they doing? They are waiting until everyone arrives so the answer for subordinate would be: until everyone arrived