I'm not entirely sure the software's working correctly. I lost my first game, and I'm fairly certain that there was a different possible orientation of mines: https://imgur.com/gallery/hg1Mcwq
There were other possibilities, but you were punished for taking a guess when there were guaranteed-safe squares. Guessing is only supposed to be safe when you have to do it.
I'll label your sequence of 2, 3, 4, 2, 2 as 2a, 3b, 4c, 2d, and 2e, respectively. Although the exact configuration around 4c was not decided, 4c necessarily provided all of the mines for 2d, leaving 2e open along with the squares above and below 2e. Therefore, the game expected you to choose 2e, the squares above and below 2e, and the square above 2a, before you were allowed to take a guess.
hatwash answered why the two green squares above and below the right-most 2 were safe. Here's why the top-left and bottom-left squares were safe:
a b c d
2 3 4 2
0 e f g
Because of the left-most 2, only two of a,b,e are mines.
That means only one of c,f is a mine - the third mine of the 3.
That means only three of b,d,e,g are mines - the remaining three mines of the 4.
But both d and g cannot be mines, because combined with the one mine in c,f that would put three mines around the right 2. So only one of d,g is a mine.
So if only one of c,f is a mine, and only one of d,g is a mine, that means b,e are both mines - the remaining two mines of the 4. So b,e can be flagged as mines.
That means the left 2 is complete, so a can be opened safely. Also the mine at e completes the bottom-most 1, and you can proceed from there.
In your screenshot, look at the green squares. Those are the spaces that are guaranteed to be safe based on the available information. The game wants you to click those before you do anything else.
Once there are no more guaranteed squares anywhere on the board, then you can guess. And if you guess somewhere that could be valid, it will be valid. But only if there are no other guaranteed spaces left.