Camelot is the city-state.Arthurian stories have this too - knights ride away from Camelot and find random castles in random forests inhabited by random ogres or enchantresses.
But Arthurian stores are not tales of city-states.
D&D is like a bunch of Camelots and Evil Camelots with wilderness filled with ogres, orcs, fairie, and evil casters in between them. And every once in awhile one of the Camelot fall and becomes a dungeon where all the monsters hold all the magic item that of all the dead knights and nobles until some adventurous steal them or they eventually antagonize one of the Camelot into war and they destroy it.
Kind of like Westeros with more monsters. Magic Rivierruns and Harernhals everywhere surrounded by orcs, fey, and dragons.