The capital of the United Kingdom is London, which is also the capital of England. There are probably many more examples in other Kingdoms like Amsterdam being the capital of the Kingdom of the Netherlands and the constituent country of the Netherlands
Well, Sovereign Military Order of Malta, Vatican City and Italy all share Rome as “capital” city.
Or at least, they have all the embassy/consular services scattered throughout the city. Rome is packed with extraterritorial areas, partially owned by the Vatican, some by the SMOM and some by the UN.
Another possibility could be Jerusalem but also this one is debated since as of today is a wannabe capital city of two different states/political entities. Not sure can be used as an example.