How is the speed of the car or rather the fastest car on the grid determined? Do they simply use the quickest possible lap according to the times the drivers put in or do they have hard data that they base this on, like top speed, downforce, tire wear, …

If it’s just based on the fastest possible lap, I feel like it doesn’t really say much about actual car speed since driver impact would still be very large here.
How is the speed of the cars determined?