I hesitate to write this answer as I am neither a metereologist, nor a hydrologist, nor a civil engineer with expertise in dams.
From what I gather from news reports and available data, the proximate cause of the Derna disaster was a flash flood of unprecedented magnitude, exacerbated by the failure of two flood-control dams.
Derna is a port city of some 90K-100K inhabitants on the Mediterranean coast of Libya, thus located almost at sea level. An intermittent river bed, Wadi Derna, bisects the city. According to Wikipedia, Wadi Derna has a length of about 75km and a drainage basin of about 575 km2, with most of that area extending west of the city, with the westernmost reaches about 25km east of Al-Bayda, at an elevation of about 600m according to Google Maps' terrain view. Based on the satellite view of Google Maps, the landscape is arid and rocky and almost completely devoid of vegetation.
The World Meteorological Organization reports that during "Daniel", precipitation of 414.1 mm was recorded in Al-Bayda within 24 hours (from 10 Sep 8am to 11 Sep 8am). If we assume, without knowledge of detailed precipitation patterns during the storm, that the entire drainage basin of Wadi Derna received 400mm of precipitation, this would amount to a total flood volume of 0.4m x 575 km2 = 0.23 km3. Based on the landscape, almost all of the precipitation would have turned into surface run-off right away. Furthermore, the steep gradient of Wadi Derna would have caused the run-off to be conducted downstream at a rapid pace.
For the massive flooding in the Ahr valley of Germany in 2021, with a somewhat lower gradient (421m difference in elevation over 85km), an expert estimated a flow speed of "several meters per second" (to my knowledge no actual measurements exist because necessary equipment was destroyed by the flood). If we take "several meters" to mean at least 3 meters, this would equate to about 11km per hour. This means that an unimpeded flood wave would have reached Derna within seven hours.
Because of significant flood events affecting Wadi Derna every few decades, two flood-control dams were constructed in the 1970s: One at the southern city limit of Derna (32.753, 22.631) and a second one some 17km upstream (32.659, 22.577). These dams were of earthen construction: essentially layers of compacted clay. They each had a concrete bell-mouth spillway, roughly in the shape of a vertically oriented trumpet. Both dams and their spillway structures are clearly visible on the satellite view of Google maps. Would the volume of water that could be impounded behind these dams have been sufficient to temporarily buffer a flood volume of 0.23 km3?
Reliable data on these two dams is hard to come by. According to one source:
The dams were constructed in the 1970s by a Yugoslavian company. The upper dam was called the Al-Bilad Dam, with a storage capacity of 1.5 million cubic metres of water, whilst the lower dam, the Abu Mansour Dam, had a storage capacity of 22.5 million cubic metres. The dams had a core of compacted clay with a carapace of stone.
I am quite skeptical about the lower number here, as the two dams visually look similar in size, and even accounting for different valley cross sections should not lead to such a huge difference in impounded volume. A conservative upper estimate might be that both dams combined could hold 2 x 22.5 million = 45 million cubic meters, or 0.045 km3, so about one fifth of the flood volume computed above. The spillways would have been unable to cope with the volume of water, leading to an overtopping of the two dams in sequence. Footage from other dam disasters, such as the collapse of the Teton Dam in 1976 indicates that a dam of earthen construction that is affected by water erosion on its downstream face will disintegrate rapidly, leading to an equally rapid release of the water impounded behind it.
Amateur video footage of one of the dams in its current state, posted on YouTube by The Independent, shows that the dam is completely gone except for the concrete spillway structure, consistent with total destruction as a result of overtopping. According to news reports, both of the flood-control dams were destroyed, and as a consequence a massive wall of water inundated the city of Derna, located directly below the lower dam, claimed by eyewitnesses to be up to 60 feet (~ 18m) in height.