Cavity between my two front teeth and caused a small gap how can it be fixed?

If there were. No space before the cavities were present, then your dentist should be able to bond the area to close the space. If there was a space (diastema) a dentist can also close that space with a bonded composite restoration. Hope this helps.
Bonding. Bonding with a white composite material can often close a space between the teeth. Was the space there before the cavity? If the space is wide sometimes bonding is not enough. Braces or in some cases veneers are a better choice. Discuss the options with your dentist.
Composite filling. Your dentist should be able to restore these teeth with a white, bonded, composite filling. This will both get rid of the cavity and fill in the gap as well.