A wave starts at zero, increases to a maximum in one direction, reverses direction and increases to a maximum in the other direction, then it reverses again; when it crosses zero is the length of a wave, a wavelength.
The number of waves per second is the frequency of oscillation.
The equation that relates wavelength and frequency for electromagnetic waves is: λν=c where λ is the wavelength, ν is the frequency and c is the speed of light. So, wavelength * frequency = speed of light.
A wave starts at the cycle start point in figure 2, it can't start at any value other than zero. You must wait until the cycle end point to measure the wavelength, how fast it gets there is the frequency.
It is possible to use a peak detector and save the location of the highest excursion of the waveform, hoping to measure the peaks in an equidistant manner. The waves in your two examples are sine waves, not all real waveforms look like that.
It's better (more exact) to make one's wavelength measurement at the zero crossing. Your figures are 'demonstrative comparisons' the artist's depiction places leader lines, arrows and writing separated from each other for ease of viewing - not positioned in optimal locations or necessarily drawn to scale.
The greater the energy, the larger the frequency and the shorter (smaller) the wavelength. Given the relationship between wavelength and frequency — the higher the frequency, the shorter the wavelength — it follows that short wavelengths are more energetic than long wavelengths.