(covers information from several alternate timelines)
The title lord or lady was a term typically used to address individuals holding certain positions, such as noblemen. The term was also used as an alternate term for the Christian "God" (DS9: "Far Beyond the Stars"), and as a general honorific used by the androids of Mudd for those they serve. (TOS: "I, Mudd") In ancient England, a lord might be referred to as "his lordship". (VOY: "Cathexis")
The title was historically used on Earth for noblemen in some Nation states. Some figures holding the title of lord on Earth were Lord Byron, Lord Halifax, and Lord Nelson. Additionally, a fictional 19th century Lord Burleigh appeared in Kathryn Janeway's holonovel Janeway Lambda one.
In 2263 of the alternate reality, Leonard McCoy exclaimed, "Lordy!" in reaction to taking his first mouthful of Glenfiddich. Similarly, Montgomery Scott stated, "Oh, my good Lord," upon discovering that the wreckage of a ship that Jaylah had found on the surface of the planet Altamid was actually the USS Franklin. (Star Trek Beyond)