An Airbus A330-303, Turkish Airlines, suffered an apparent compressor stall just after take-off

Turkish Airlines flight Istanbul to Johannesburg, departed Wednesday (07.09.2021) at 01:45 am (Istanbul time), massive booms from the left engine (Nu.1) on take-off, with bursts of flames from front of the affected engine, for about 20 seconds during takeoff.
The aircraft entered a holding pattern at 6000 feet to burn fuel and landed safely almost 4 hours and 30 minutes after takeoff.
Upon landing, Airplane taxied straight to the Turkish air technical hangar and passengers disembarked to buses to the terminal.
Pilot Note:

How dangerous is such a situation on a twin-jet with a full payload of pax, fuel? First of all, It s easy to control this emergency. However, any engine failure at or near V1 can be a serious situation, but normally if the pilots handle it effectively, it won’t become a problem.
Pls check the below image out to better understand what happened and what action to be taken?