Some capitals and countries have very similar names, often because one was based on the other- e.g. Brasilia/Brazil, and Algiers/Algeria. This could get very complicated, using all the different versions in the different languages used, both in those countries and from abroad, so I will confine myself to the names (short forms) used in English.
Identical capital/country (apart from adding "city" to distinguish between them):
Andorra
Djibouti
Guatemala
Kuwait
Luxembourg
Mexico
Monaco
Panama
San Marino
Singapore
Vatican City
Very similar or related, but not exactly the same:
Algiers/Algeria
Brasilia/Brazil
Santo Domingo/Dominican Republic
San Salvador/El Salvador
Bissau/Guinea-Bissau
São Tomé/São Tomé and Principe
Taipei/"Chinese Taipei" (a.k.a. Taiwan, a.k.a. Republic of China)
Tunis/Tunisia
Belize* (was named after the former capital of the colony of British Honduras, and its river, but a new capital, Belmopan, was established in 1970, prior to the colony name becoming Belize in 1973)
-see
https://www.countries-ofthe-world.com/capitals-of-the-world.html