(covers information from several alternate timelines)
The title lord or lady was an appellation used to address individuals holding certain nobility. 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 the mirror universe, the title was in use by the Terran Empire well into the 23rd century. "Lords of the Empire" were aboard the ISS Charon when Gabriel Lorca managed to take over the ship, and were executed by his people. (DIS: "Vaulting Ambition", "What's Past Is Prologue")
The term "lord" was also used in Klingon society. L'Rell and Voq typically addressed T'Kuvma as "my lord". (DIS: "The Vulcan Hello", "Battle at the Binary Stars", "The Butcher's Knife Cares Not for the Lamb's Cry") When L'Rell referred to Voq with that phrase after T'Kuvma was killed in battle, Voq questioned why she was doing so, to which she reminded him that T'Kuvma had made Voq his successor. Voq, on the other hand, continued to refer to T'Kuvma as "my lord". (DIS: "The Butcher's Knife Cares Not for the Lamb's Cry") While feigning allegiance to Kol, L'Rell addressed him with that phrase. (DIS: "Si Vis Pacem, Para Bellum") He was also referred to as "my lord" by his true followers. (DIS: "Into the Forest I Go") Klingon commander Kruge was likewise referred to by Valkris and his crew as "my lord". (Star Trek III: The Search for Spock)
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)