Traditionally you go by time and weight to decided when to stop the espresso shot. Some goes by color.
But the best way to know how long a given coffee should run before the shot is terminated is by taste.
Light roasted coffee often has a lot of nice taste can be extracted after the classic 1:2 ration (= twice as much in the cup as dry grind first placed in the portafilter).
This you will only know by exploring with a tea spoon during the shot. See my video on this https://www.youtube.com/watch?v=VCovMAG2LXM
Note: the first 10 grams is always very acidic. So I don’t start tasting untill the weight has exeeded 10 grams.