By default, the last image output of a notebook will be used as its thumbnail. Without an image output, a placeholder will be used. See a notebook with no thumbnail for an example.
Although the next cell contains an image (a plot), it won’t be used as the thumbnail because it’s not the last in the notebook, and we haven’t explicitly tagged it.
But the next cell is the last containing an image in the notebook, so its last image output will be used as the thumbnail.