My school rank is around the low end of the top 150-160 schools. Every year there is mostly 1 band 6 for extension 2 although I belive in 2020 and 2021 there was not.
Well for starters, I think ranking 1st in your cohort would be the first condition in terms of internal assessment marks. Then in the HSC you'd generally want a raw exam mark of at least 65, although it varies between years so aiming for 70 would be safer: https://rawmarks.info/mathematics/mathematics-extension-2/. Assuming you're ranked first, you wouldn't be affected by your cohort's marks.