Tristan und Isolde is a legend based largely on the works by the Middle High German author Gottfried von Strassburg. He wrote the courtly romance "Tristan." He is, together with Wolfram von Eschenbach's "Parzival" and the "Nibelungenliedas"...considered one of the great narrative masterpieces of the German Middle Ages.
There are a lot of sources on the internet and books from many authors that could help you to arrive at whether Tristan and Isolde are merely legends or will make you assume that it was based on a real story. Many people would say it was merely based on legend. It may very well be the correct conclusion.
But what is a legend, we might ask? A legend is a narrative of human actions that are perceived both by teller and listeners to take place within human history and to possess certain qualities that give the tale "of being true or real." The Brothers Grimm, for one, defined legend as folktale that is historically grounded. The legend of Tristan and Iseult is an influential romance and tragedy, retold in numerous sources with as many variations. I won't go into the story since I assume you know it already. But while the details of the story differ from one author to another, the overall plot structure remains much the same. THIS LEGEND HAS BEEN CALLED ONE OF THE WORLD'S GREATEST LOVE STORIES EVER.
Consider the works of Richard Wagner, the German composer. The subject matter of most of his works was drawn from Norse and Teutonic mythology...and from history. There are a lot of negative things one can write about Wagner; extreme egotism, nationalism, financial and emotional irresponsibility, an anti-semite...BUT AT THE SAME TIME, HE WAS AN EXTREMELY WELL-READ PERSON AND WAS FAMILIAR WITH THE LITERATURE AND PHILOSOPHY OF MANY COUNTRIES. In certain areas of these disciplines, Wagner is considered an authority! He wrote voluminously on almost every conceivable question--artistic, social, or political/historical. In all cases, he adapted the source material with the utmost freedom to his own artistic purposes...and that's where the blurring of the lines between legend and history becomes too apparent. In his major work for example, the 4-part cycle DER RING DES NIBELUNGEN, this took Wagner more than a quarter of a century to finish. And although Wagner's principal source was not the NIBELUNGENLIED but the VOLSUNGA SAGA (a Scandinavian cycle of legends...but also the base for the German Nibelungenlied), he took materials also from other sources. My point is legends do start sometimes from the imagination of people, which is mixed with real lives from multiple sources that actually happened.
When Wagner was working on the Nibelungenlied, its composition was interrupted by two other operas, one tragic and one comic. Intended to be small, practical potboilers that would make an income for the completion of the "Ring"...both of these operas substantially outgrew their original conception...TO BECOME TWO OF THE MOST DEMANDING OPERAS EVER WRITTEN---"TRISTAN AND ISOLDE" and "Die Meistersinger von Nurnberg." Tristan und Iseult is, as you know, the tragic story is of the love between the Cornish knight Tristan (Tristram) and the Irish princess Iseult. The narrative predates and most likely influenced the Arthurian romance of Lancelot and Guinevere, and has had a substantial impact on Western art, the idea of romantic love and literature since it first appeared in the 12th century. While the details of the story differ from one author to another, the overall plot structure remains much the same.
That's my 2 cents...and of course, you are entitled to your very own opinion.
...