What scores would be considered competitive for admission in top universities

I have taken the IB diploma program and was wondering what scores out of 45 would be competitive enough to get me into an Ivy league University or any other highly credited universities like Carnegie Mellon or USC etc.

An IB score alone will not get you into any of those schools. They are all holistic. That said your score cannot be too high.

I got a 1540 SAT score, but i didnt understand why they couldnt be too high

Because these schools all get 40K+ applications per cycle, and routinely reject applicants with 1600. As noted above, admissions is holistic.

In terms of IB scores, most applicants will not have results until after admissions decisions have been made.

They are trying to say that for the score, the higher the better, and there is no such thing as too high a score. Even with a perfect score, many are still rejected