Gravity makes an upward-moving object move 9.8 m/s slower every second.
So if it leaves the ground at 10 m/s, it'll run out of upward speed in
(10 m/s) / (9.8 m/s²) = 1.02 seconds
At that time, since it has no more upward speed, it'll start falling. So at that instant, it was exactly at its maximum height.