Top Speed
In the GTA Online Expanded & Enhanced Edition (PS5 and Xbox Series X/S), the fastest car is the Declasse Vigero ZX (HSW) (157.5 mph). The Vigero ZX, among other cars, is exclusive to the E&E Edition. The reason for the E&E Edition-exclusive cars' superior performance is that they can be converted to a higher performance version, the "HSW Performance Upgrade", at Hao's Special Works, a mod shop exclusive to the E&E Edition.
In the GTA Online Enhanced Edition (PC, PS4, and Xbox One), the fastest car is the Grotti Vigilante (147 mph), a weaponized, rocket-boosted car.
The fastest non-weaponized, non-rocket boosted car in GTA Online Enhanced Edition is the BF Weevil Custom (137.5 mph).
These are all according to vehicle testing by Broughy1322, who tests vehicle top speed by driving them on a straight road.
Lap Time
Broughy1322 also tests vehicle lap times by driving them around a circuit, rather than a straight road. This also takes the vehicle stats: acceleration, handling, traction, braking, and weight, among other stats, more into consideration.
The GTA Online car with the fastest lap time is the Benefactor BR8 (0:54.788) (121 mph), a Formula One car.
The GTA Online car with the second fastest lap time is the Pegassi Weaponized Ignus (HSW) (0:55.589) (146.25 mph), which is exclusive to the Expanded & Enhanced Edition (PS5 and Xbox Series X/S).
Broughy1322's testing takes the game's physics into account, as opposed to just getting the stats from the game files which is less indicative of actual top speed or lap time. See his webpage (linked below) for a detailed explanation and videos of his vehicle testing methodology.
Sources: