Not a legal term but ODFOD.
OP there are legal obligations that the landlord has to have met when they serve a s21. The s21 does not end your tenancy, the LL has to go go to court to gain a possession order. The LL might not be entitled to possession if they have failed to protect any deposit (if paid) Gas Safety certificate not given before the service of the notice (there are also arguments to be made if there was no GSC given at the start of your tenancy) Energy Performance Cert and relevant version of Gvmt How to rent Guide all have to have been provided before the service of the notice.
The LL needs to apply to court to claim possession, when they do this you will receive the claim and a defence form. If there is a defence, LL has to remedy all the failure before serving a new notice (this is for s21 only) which will give you more time in the property.
If LL has sold the house, you still do not need to leave, the new LL has to follow the same process.
Also. worth noting that the LL has to apply to court within 6 months of the notice being served otherwise their claim will fail.
The council will help if you are eventually evicted. You are not yet considered homeless only "threatened with" so council do not have a duty to accommodate you yet.
However, you can be considered legally homeless if your property is not reasonable to occupy due to the disrepair so let the council know this at your meeting
S8 notices can be defended with regards to disrepair (depending on what grounds are used)
Disrepair is not a defence to a s21- however LL still has repairing obligations but this is a separate matter from the possession proceedings and you can report this to your Private Housing Standards team at the council (or at your upcoming meeting)
Have a look at Shelter website which goes in to this all of your issues in more detail.