I'm hoping I can maybe tag-team this answer with a follow up from someone familiar with the medieval islamic period through the modern era.
As for late antiquity -
It's important to remember that Carthage, and many of it's similar urban neighbors in North Africa, quickly became corner-stones in the Roman Empire following their incorporation as provinces. They were economic and political centers that did no less than produce significant emperors. Part of that success was derived from the cosmopolitan nature of Carthage and its other port city neighbors, which allowed it a significant degree of cultural fluidity. Port cities naturally harbor a diversity of peoples, both ethnically and economically, and trend towards cultural connections made through trade to other cosmopolitan cities (Driessen 2006). This can lead to a brand of cosmopolitan familiarity where, for example, the mercantile and political class of Carthage more closely associate with their peers in other port/urban cities than with their inland neighbors. This kind of attitude can prove very profitable when part of a large and diverse trade network. Carthage did not then need to hold onto a singular, historically rooted cultural identity in order to flourish during its time as a Roman city. The same idea follows during its time as a Vandal capital and subsequent Byzantine period. This is not to say that the memory of the Carthaginian empire was destroyed through cosmopolitanism, but simply that the idea of a return to that period would not have been any more appealing or unifying to the region's residents.
With that in mind, we can address exactly what happened after, as you stated in the question, the destruction of old Carthage at the end of the 7th / beginning of the 8th Century.
More or less, Carthage was one of the last hold-outs of the Byzantines in North Africa, and was swept up in tide of Arab expansion. Under Arab rule, the population of Carthage was displaced and removed to nearby Medina al Tunis, which was built as a (then) modern city reflecting the norms of the Arab empire. The nearby ruins of old Carthage served primarily as building material to engineer the new city, and tunis would continue through the medieval period as an equally cosmopolitan Arab city.
And here is where I need to tag off with someone more familiar with the medieval through modern period, because my assumption is that Tunis remained an Arab city first and foremost, with little desire to return to a pre-islamic empire. That assumption comes from a discussion had in "Imperialism, Power, & Identity: experiencing that Roman Empire" by D. Mattingly (2013), in a chapter that discusses issues of encouraging the modern populations of North African countries to consider Roman ruins as part of their own heritage.
Citation from "Mediterranean port cities: Cosmopolitanism reconsidered" by H. Driessen (2006).
Adding to SleepyScholar, I would note that between the time Rome took over Carthage and the Byzantines lost it to Islam, there was the period of the Vandals, who came from eastern Europe, crossed Gaul, then Spain, then in 428, under the leadership of Gaiseric (ca. 400–477), crossed from Spain to North Africa, the western parts of which they found congenial and settled into. In 439, they took Carthage. Carthage had recovered brilliantly in the centuries after the Punic Wars, in good part on the basis of its agriculture, the fruits of which were largely shipped off to Rome.
Taking Carthage gave the Vandals its considerable merchant fleet, along with its navy, which proved useful in raiding the coastal towns of Sicily and Southern Italy. These raids were concern making for some, but for anyone living in Rome, they were less a worry than the fact that Gaiseric had made it clear that Carthage was not going to pay taxes.
That is to say, the dole, the staple of Rome for five hundred years, was now
at an end.
Politics and diplomacy were called for, Gaiseric and the Roman emperor Valentinian were able to come to mutually satisfactory terms. General peace was guaranteed (i.e., fewer Vandal raids), trade reopened, and if Rome wanted grain, they would ahve to pay for it. (Which they did.) To cement this treaty, Valentinian pledged his daughter Eudocia in marriage to Gaiseric’s son Huneric when the two came of age. All well and good, and whether through oversight or necessity, the fact was that Huneric was next in line to inherit the Roman Empire once Valentinian died.
Valentinian did die, in 455, assassinated by Petronius Maximus, who claimed the throne for himself. It was a bold move but ill advised, given Gaiseric’s past history of blood and violence. This was a man who had not only taken over Carthage, but acquired its considerable navy and merchant fleet as well. In short order, this fleet carried his army of Vandals up the coast of Italy to the Tiber, ready to avenge the murder of his son’s prospective father-in-law. As it turned out, there was little enough for him to do—the Roman
mob had already stoned Maximus to death, preserving honor all around. By simply showing up to support the Romans, Gaiseric had proved a good and honorable ally, and the locals hoped he would have a safe voyage home.
Gaiseric has a different take on the matter. Having come this far, he saw no reason to waste the trip. He was a Vandal, Vandals sack cities, and just because the man who was the reason he had come was now dead did nothing to change those facts. Pope Leo I came out to discuss the matter and managed to strike a bargain. Gaiseric agreed that he would neither kill nor enslave the people of Rome. The goods of Rome, however—those Gaiseric would be taking with him, along with the royal widow and her two daughters.24
For the next two weeks, Gaiseric’s men methodically went through the city and gathered everything of value not nailed down (and in some cases, like the bronze roof of the temple of Jupiter—gilded, not the solid gold they had hoped for—much that was nailed down), loaded it into carts and into the boats waiting in the river, then sailed down to Ostia and back to Carthage. The chroniclers mention the copper cooking pots in the imperial kitchens of the Palatine. Those same people who had sat by the seaside a few years earlier waiting in vain for the grain ships now watched as the very ships that once had been their sustenance were now piled high with the wealth of centuries. What was to become of them? Easeful urbanites now had to envy the country mice cousins who had managed to maintain the ancient Roman
virtues of working the land.
There is evidence that this gloomy view was not the whole story, or even close to it. The dole may have gone, but markets continued to function, the ships to sail, tourists and pilgrims to visit. Some Roman rich had fled from Carthage when the Vandals first showed up, but those who remained there found that the new overlords were content to live a life of some luxury in their conquered real estate. Carthage boomed in the wake of Gaiseric’s expedition, and to the extent that trade declined at all, it did so slowly.
And in due course the Byzantines enter the picture.