This answer complements the existing ones by @wl and @JS1, who found the actual solution of the puzzle. I just want to explain one aspect which seemed obvious to me but which isn't mentioned in the previous answers: how to fill in the squares of the grid, i.e. how the numbers are chosen (they're not random!), what the question marks should be, and the difference between a question mark and a blank square.
Two observations make it clear what we should be looking for:
the fact that the numbers appearing in the grid are the first few primes (2,3,5,7);
the title containing "Sieve of Eratosthenes".
In fact, there's a very natural pattern to the numbers:
each $n\times n$ grid is first filled with all the numbers from $1$ to $n^2$, in order, left to right and top to bottom. Then each number is replaced by its lowest prime factor, or blanked out if that prime is bigger than 7.
Or to put it even more naturally, following the title:
first write $2$ in every even-numbered square, then write $3$ in every still-blank multiple-of-3 square, then write $5$ in every still-blank multiple-of-5 square, then write $7$ in every still-blank multiple-of-7 square. (We don't need to go to $11$, because the smallest number which is a multiple of $11$ but not any smaller prime is $121>100$.)
For the $4\times4$ grid in the example, this gives:
1 2 3 4 2 3 2
5 6 7 8 5 2 7 2
9 10 11 12 3 2 2
13 14 15 16 2 3 2
which shows how the question marks would be filled in.
For the $10\times10$ grid, we do the same again using
the numbers from $1$ to $100$. Again all the question marks can be filled in in a natural way, and the blank squares (corresponding to prime numbers) remain blank.