How do I know when to stop pulling my shot? I have a manual espresso machine. I have to turn the pump on and off with a switch and judge when to stop by myself.

How do I judge when the best point is to stop pulling the shot? Do I do it by volume, colour, or something else?
I generally judge when to stop my shot based off when blonding begins to occur. This is when the espresso changes to a noticeably lighter, yellowish color. At this stage, only bitter flavors are being extracted from the coffee, and any more extraction will only degrade the flavor of your shot.

It takes a bit of practice to notice blonding, and can be made more obvious by using a bottomless portafilter. I also suggest using a stopwatch to determine how long it takes before blonding occurs, so you can see how consistent the rest of your process is.