To edit a photo with colored portions and the rest in black and white, you can use Adobe Photoshop. First, open the image in Photoshop. Then, choose the Quick Selection Tool from the toolbar and click and draw to select the area you want to keep in color. To deselect unwanted areas, press the Option key and draw over the unwanted area or select the Subtract from selection button from the top menu. Once you have selected the area you want to keep in color, invert the selection by going to Select > Inverse (or by pressing Shift + Command + I on a Mac, or Shift + Ctrl + I on a PC). With the rest of the image selected, desaturate it by going to Image > Adjustments > Desaturate (or by pressing Command + Shift + U on a Mac, or Ctrl + Shift + U on a PC). This will turn the selected portion of the image black and white, while leaving the original colored area intact.
If you want to create a more dramatic effect, you can try using the Black and White adjustment layer instead of desaturating the image. This will give you more control over the tonality of the black and white portion of the image. To do this, go to the Layers panel, click on the Create new fill or adjustment layer icon (which looks like a half-black, half-white circle), and select Black and White. This will add a Black and White adjustment layer above your original image layer. You can then use the sliders in the Properties panel to adjust the tonality of the black and white portion of the image.
It's also worth noting that there are other ways to achieve this effect on a phone, using apps like Google Photos, Color Pop on iPhone, and Fotor on Android. These apps offer easy-to-use tools for selectively coloring an image, and can be a good option if you don't have access to a computer with Photoshop.