Trope
Academic Rivalry
Competing for the top mark and losing at everything else.
7 books on this shelf, newest first.
Academic rivalry is enemies-to-lovers with a class rank attached. The competition is public and measurable, which gives every interaction a scoreboard, and the intimacy comes from being the only two people who take the work as seriously as each other.
Where to start: Dark academia settings raise the stakes to obsession; contemporary campus romance keeps it lighter and funnier. If you want the rivalry to actually matter to the plot, look for books where the prize is a place, a grant or a title rather than just a grade.