Hi
The tiny flies are more likely to be 'fungus gnats' in the soil. They don't chew on leaves. They lay eggs in damp soil, then grow up and fly around.
If there is loose soil above the roots, take it off. The roots is came with don't need to be buried any more, should be exposed the same as they had been growing.
Don't water too frequently- plants need to breathe as well as drink.
Beware the pot with attached saucer (I think) - I find many of them don't drain well and stay wet longer.
Buy sticky traps for gnats
https://www.amazon.com/dp/B07XLM4FWL/
I'm not sure on ID- a Dracaena, a Cordyline? Without an ID I'd say you want it placed near a window. Many plant owners start out thinking plants are OK anywhere in a house, but typical house interiors are too dim for long term plant growing.
Your plant looks nice and I wouldn't worry over a few small damages. It doesn't look fresh, is it possible you just now noticed small defects that were on the plant when you bought it? Do you have a cat?