What is the best way to create a rounded progress bar

The title says it all. I want to create something similar to the image below:
image build semi circle progress bar with round corners and shadow in ...

Duplicate your face into two layers. In a graphics program like GIMP or Photoshop, cut out a hole in the exact shape and area you want the progress bar. Leave that space transparent and export. In the editor, the original face will be the bottom layer, the progress bar will be layer 2, and the new layer with a hole will lay on top, acting as a mask. Resize the progress bar so it fits. BOOM rounded corners

The principles are described here, nothing prevents you from making rounded ends, the author described the correct process above.