
One cannot see the photoelectrons, hence it has to be measured indirectly by measuring the stopping potential. There are two types accelerating potential or stopping potential. V acc will increase KE of electron but Vs will decrease the KE of electron to zero , hence electron cannot touch the collector. I cannot see the electron stopping just before the collector but I can see the ammeter reducing to zero value (no electron collected) as I increase the magnitude of stopping potential. Hence stopping potential correspond the the KE of the fastest electron (KE max). Formula : qVs = KE max.
Analogy: If you can jump very high , I deduce that you can run very fast . This is a known fact in our everyday life.The equation : KE = mgh. Compare will KE = qVs. Do you see similarity in this two worlds micro and macro world. Hence measuring how high you can jump indirectly gives me your KE. Do the same to photoelectrons , as V stop can be measured using voltmeter hence KE max can be found. Electrons are not visible so it is impossible to measure its velocity directly.