Note: not a duplicate of this question as I'd like to know what's wrong with my approach.
My attempt: Choose any 3 of the $n$ vertices of the polygon, and let the number of points between the three be $x$,$y$ and $z$. Then, $x+y+z=n-3$ and $x, y, z\ge 1$. The number of possible solutions is a sticks-and-stars problem, and can be shown to be $n-4 \choose 2$. From the top answer to the question linked above though, the correct answer is $\binom{n}{3}-(n-4)n-n$.
Putting in some values for $n$, I can see that I'm undercounting. How?
Your approach is nearly correct, you just need to tweak it because you are only determining the spacing between the vertices, but not the vertices concretely.
For instance, if $n=10$, then the solution $3 + 2 + 3$ means you picked 3 vertices spaced out by $3,2$ and $3$, but concretely we don't know which they are. (You basically need to pick one of the vertices, because then the others will be fixed.)
In fact, if you multiply your result by $n/3$, you'll see that you get the correct result:
$$\frac n3\binom{n-4}2 = \frac{n(n-4)(n-5)}{6} = \binom n3-(n-4)n-n.$$