Assuming PC, In no particular order;
Assetto Corsa; A proper sim racing game and great value as you pick it up with al the dlc for cheap these days. Also on PC it's open to mods so there are hundreds of additional cars and tracks available most for free. There is a career mode but it's pretty simple one from what I remember (start in a slow car and work your way up but simply pick a class and go racin). Online isn't as populated as it used to be but still plent of racing to be had.
Assetto Corsa Competizione; Based off the the original AC but currently solely based on GT3 racing (with GT4 to be added at some point). ACC doesn't support mods so you only get official content but it's a much more recent game so online is more populated. Career mode is alright though being only GT3 there's no real element of progression.
Project Cars 2: A decent sim title, handling is a little weird in some cars and requires 3rd party force feedback settings to get the most out of it. In standard trim it's the game with the most content of the lot and has DLC too. I haven't played it in a while so I can't comment on online but it used to be comparable to Assetto Corsa's numbers so presume it still is. Career in PC2 is probably the best of the lot though, similar to Assetto Corsa it's based on start in slow cars and work your way up but more involved with your performance and invitationals etc.
iRacing - The price puts a lot of people off and it is expensive when solely compared on price but for online racing I don't think there is a better choice. Outside the price though it does come with som negatives for what you're after, namely there is no career mode.
That is a mostly objective look at the games, subjectively I have a hard time recommending anything other than iracing if you only want online and don't mind the cost or if you don't then Assetto Corsa. Though with your desire for a career I'd lean towards PC2.
There's others out there too but they're much older titles (rf2, nkpro, LFS, GTR2) haven't come out (Automobilista 2) yet or don't have the realism to make the list (Forza).