I try defined recurrency procedure for this shape:
I know that if n==0 then we need plot square. But clockwise?
Next is plot smaller square, but I have a problem with a tour around the square. My procedure should be allowed for a variable number of stages.
Can you have an idea of how to define this procedure?

I have a way to do this without recursion, but again, I'm not sure if it meets the requirements of your assignment. This is far too complicated for me to type in a comment box, but it's a provisional answer only.
I would do it with a queue. First draw a square of side $S$, centered at the origin. Now for $n=0,1,2,3$ enqueue a record of the form $$\left(\frac S2, x_n, y_n, n, 2\right)$$ These are to be interpreted as $$(side,center_x, center_y, type, stage),$$ where $$x_n=\frac{3S\sqrt2}{4}\cos\left(\frac{n\pi}{2}+\frac{\pi}{4}\right)\\ y_n=\frac{3S\sqrt2}{4}\sin\left(\frac{n\pi}{2}+\frac{\pi}{4}\right) $$ Now, while the queue is not empty, do the following:
In the last step, we reduce the current side by a factor of $2$ and increase the stage by $1$. We get the centers of the squares in much the same way as in the first step. First, pretend that the current square is centered at the origin, so we can use exactly the same formula. Then just add the $x$ and $y$ coordinates of the current center to the computed $x$ and $y$ coordinates.
The only wrinkle is that we don't add a square of the type opposite to the current type to the queue. (I made an earlier edit saying this is unnecessary, but I was wrong.)
Your computer graphics system may not allow for negative coordinates, but this is no problem. Just add the $x$ and $y$ coordinates of the first square to the $x$ and $y$ coordinates of the centers of the first $4$ squares in the queue.
Mathematically, it looks like this will draw the squares counter-clockwise, but since the $y$-coordinate in computer graphics increases as the point moves down, I believe this will draw them clockwise on the screen.
This should draw the big square, then the $4$ stage $2$ squares, then $3$ stage $3$ squares touching each stage $2$ square, and so on. When the stage $3$ squares are drawn, first $3$ will be drawn, in clockwise order, around one of the stage $2$ squares, then we will move clockwise to the next stage $2$ square and draw $3$ stage $3$ squares touching it, and so on.
This worked for me:
With the arguments
200 5this produced