Edinburgh is one of the best travel destinations in the world.
Earth Trekkers has provided a pretty good travel guide for Edinburgh.
The primary things to do in Edinburgh include: the Royal Mile (1 day), the National Museum of Scotland, Scottish National Gallery, and Dean Village (1 day).
According to Wikipedia, "Edinburgh is the capital city of Scotland and one of its 32 council areas. Historically part of the county of Midlothian (interchangeably Edinburghshire before 1921), it is located in Lothian on the southern shore of the Firth of Forth. Edinburgh is Scotland's second-most populous city, after Glasgow, and the seventh-most populous city in the United Kingdom."
Here we quote the best way to travel in Edinburgh provided by Earth Trekkers, a very good travel website created by an around-the-world traveler.
Check ChatGPT's answer for alternative itinerary.