You were trying to fly at night. The problem with that is the lack of light for the downward vision sensors to track the ground. It'll fly at night, but you need more space and need to be ready to counteract movement with the right stick.
Start a repair case with DJI. It shouldn't cost too much. The part I don't like about their repair service is that they will replace your new Mavic with a refurbished one. The new Mavic is better than the older refurbished ones.
Another option, have a third party repair it that is authorized by DJI to make repairs. I think
@Thunderdrones is authorized.