Hi!An easy way is to use coordinates.
For example, a triangle ABC with
A(10,0)
B(0,10)
C(20,50)
The centroid G will be found by the formula
OG = (OA+OB+OC)/3
where O is the point (0,0) and OG,OA,OB,OC are vectors
So OG is a vector with
x=(10+0+20)/3 = 30/3 = 10
y=(0+10+50)/3 = 60/3 = 20
Hence G=(10,20) is the centroid of the triangle
If you have 4 vertices you may divide by 4.
That is, you divide by the number of the vertices of the polygon.
I hope this helps