What does it take to get into top UK schools?

They don’t care about grades (except St Andrews or Oxbridge). At all. Like, you could have a 2.8 and Manchester, Bristol, Dundee, Aberdeen, Durham, York… Wouldn’t care.
However they would very much care that you have 3-4 AP 5s in specific subjects.
Typically if you apply for Stem, it means calc BC and AP physics (c?) + Others (chem or bio or CS). If you apply for Economics, BC+ economics. For Humanities/social science, AP lit and/or lang, AP History. Note that for econ you need both micro and macro, for gov you need both comp and us.
Anything “joint” with a foreign language would require the AP in that language.