how to add collider to the line that I have painted ?

Calculate a convex hull and convert it into mesh for MeshCollider to use.