Hi Nomestack.
First of all, you need to keep a track for each shape location. Then you can detect possible collisions. Here is main principle.
object1X = 100
object1Y = 100
Object2X = 200
Object2Y = 200
Of course, you can turn those as arrays, but lets go like this for example.
Formula itself is easy, you may study it here https://wumbo.net/formula/distance-between-two-points-2d/
Calculate distance between your player and each object (shape) you have. If distance gets too small, dont allow movement.
You propably keep track of x & y like PlayerX & PlayerY, dont change them before you have checked the collision.