The theories are that its a mythic retelling of a legend that's an embellished version of something that basically 'kind of' happened, around the time of the Late Bronze Age Collapse, between the 13th and 12th centuries BCE.
The original date of it being first written down is somewhere in the 8th century BCE, so, yeah roughly 500 years of oral tradition untill then.
https://www.britannica.com/topic/Is-the-Odyssey-a-True-Story
Schliemann’s findings and the continuing work of later archeologists seriously fueled theories of the historicity of the Trojan War, dated by later Greek authors to the 12th or 13th century bce. While the mere existence of Troy is not proof that the war was real, the discovery of arrowheads, signs of fire, and unburied bodies found in a layer corresponding to the 13th century bce indicates the possibility of battles having occurred.
Supporting evidence includes Hittite records mentioning warfare with Wilusa, their name for Troy. Some historians believe that a kingdom the Hittites called Ahhiyawa was really Achaea, or ancient Greece. Records suggest that sometime in the 13th century, Ahhiyawan forces were involved in a war against Wilusa, whose ruler, Aleksandu (very similar to Alexandros, a name for the Trojan prince Paris), requested military aid from the Hittites. Experts believe that a real conflict or a series of conflicts of some scale—either a struggle for political or commercial supremacy—inspired embellished accounts of the Trojan War.
So... taken in whole... the Odyssey is maybe roughly as actually historically accurate as... the Old Testament.
If your lense is 'is this legitimate history?'...
There are kernels of events that basically actually happened, and some important people who did something vaguely similar to what's described in the stories... around which is erected a grand mythic narrative featuring a great amount of totally fantastic and impossible nonsense, and many wholly fabricated characters and 'plot points'.