Allowing the player to draw something that turn in 2d shape with collison and solid color

Does anyone have any idea on how to do that ?

that’s hard. you’d need to keep track of the finger and need to average their alignment out so you get lines, close to the shape. connect them at the end or touch exit.
this can be the polygoncollider.
Then you need a triangulation algorithm for the mesh to make the whole thing show up, basically constructing a whole mesh.

the whole thing in short, hard work.