Sciarids aka fungus gnats.
Larvae can be harmful for seedlings and young clones, but as your plant is already flowering, it will be ok, but they will be more and more if you don’t move.
They like humidity, dead roots and decaying plant, so let dry your soil as much as possible, and if you defoliate, don’t let cut leaves in the pot.
You can get rid of them by using neem oil. Simply mix a few drops of neem oil in a tablespoon of liquid soap for each liter of water. Cheap, easy and organic. This will kill arvae and make adults unable to reproduce.