this is the first time I ask a question here. I want to know what's the simplest way of calculating the coordinates for the 4 points of a square/rectangle on a plane, after a rotation around a point, given an angle.
Example of the rotation of a square.
Thanks in advance.

Are you familiar with the equations for polar form: $r\cos\theta = x$ and $r\sin\theta = y$? These formulas will help you here.
Given a square, you can find the distance from any vertex to the origin ($r$) using Pythagorean theorem. You will know $x$ and $y$ because of the graph. Then, it's a matter of finding $\theta$.
Once this is done, all rotations are simply a matter of adding degrees to $\theta$. If you want to find the coordinates in Cartesian again, then simply use the above transformation equations.