Let's see it definition-wise:
Harmonic: An integral resonant frequency of the fundamental frequency is called harmonic, when the integral value is unity then it's the fundamental frequency or fundamental frequency
Overtone: An overtone is any resonant frequency above the fundamental frequency of a sound. (An overtone may or may not be a harmonic)
So, the overtone is dependent on your reference (Not frame of reference but more like marking reference), and conventionally for ease, $n^{th}$ harmonic is $n^{th}-1$ overtone (In case of a stretched string and open pipe), and $n^{th}$ harmonic is $n^{th}-2$ overtone (In case of a closed pipe).
The question whether the $3^{rd}$ harmonic is $2^{nd}$ overtone or $1^{st}$ overtone?
The second image explains in detail the overtone and harmonic of only closed pipes while the first image explains all three i.e, stretched string, and open and closed pipes. I understand why you may feel the first image to be wrong as the third harmonic is the second overtone in the first image but the first overtone in the second image. Let us consider it this way, in the first image we are taking an open pipe and stretched string also in comparison with the closed pipe hence we are assigning $1^{st}$ overtone to $2^{nd}$ harmonic that is why we have to assign $2^{nd}$ overtone to $3^{rd}$ harmonic (Still keeping in mind that it is just a nomenclature and doesn't have a hard and fast rule). Now in the case of the second image, there is no $2^{nd}$ harmonic and directly $3^{rd}$ harmonic so we name this as the $1^{st}$ overtone.
Another way of seeing this is:
Considering three numbers 1,2 and 3 we can assign them $\alpha$, $\beta$, and $\delta$ as their name respectively but now in another situation, we have only 1, and 3 then we assign them $\alpha$ and $\beta$. Hence, '3' is both $\delta$ and $\beta$ in different cases. Even though it has the same value i.e., 3. The only difference is the name. Here 3 is analogous to $3^{rd}$ Harmonic in closed pipe, $\delta$ is $2^{nd}$ overtone in first image and $\beta$ is $1^{st}$ overtone in second image. Overall harmonic is the actual name and overtone is its nickname or reference name given by us in different situations.
Hope this helps.
Do correct me if I'm wrong.