How to find this minimum number on an intuitive level is understandable (see figure)
Let the side of the square n be given, then this number equals:
min = 4 + (n^2 - (3*floor(n/2)^2 + ceil(n/2)^2) (1)
that is, for even n , min = 4 , and for odd min = 4 + кол-во единичных квадратов
But it is not clear how to formally prove the formula (1)?
That is what this is
(n^2 - (3*floor(n/2)^2 + ceil(n/2)^2)
there is nothing like the minimum required number of unit squares.
update
as it turned out, formula 1 is not optimal in the general case (see the @Harry example)
Then the question is:
How to find the minimum number of squares besides yourself with which you can cover this square?

