If you are unhappy with the placement of your last vertex, you can delete it by pressing “del”, “backspace”, or “D”. To erase all vertices and start over, you can press “esc”.
There are various ways to finish a polygon. You can “close the loop” by left-clicking on the first vertex. You can also press “enter”, or do a left mouse-button double-click to complete the polygon without having to find the first vertex.