I don't really understand the first one but it looks to be the popular option.
The second one is the one I made on my own reading the man page but I'm not sure I do it right.
ffmpeg -i inputfile.mkv -vf "select=eq(n\,0)" output_image.jpg
ffmpeg -i inputfile.mkv -frames:v 1 output_image.jpg