These are fungus gnats and will only breed in soil that is constantly too wet.
Do not water again until the top inch and a half is completely dry.
Once the soil is dry, they should go away.
Remember, - deep water, let dry out until top inch and a half is dry, deep water then let dry out until the top inch and a half is dry again. This is the correct schedule for cannabis, they do noy like frequent shallow watering with small amounts of water.