Factors affecting quality score are –
The relevance of keywords and ads
Landing page quality
Click-Through Rate (CTR) of the keyword
Historical account data