The general problem you are approaching is called segmentation. And the mainstream solution is deep learning segmentation, able to detect contours of “objects” it was trained to recognize.
We don’t have info about your purposed or how much time you want to spend on this (how many years).
I can recommend you to look for GrabCut tutorial and try it on your image.
https://docs.opencv.org/master/d8/d83/tutorial_py_grabcut.html