What is the lowest CR creature that has Legendary Actions?
I'm open to answers referencing creatures from any officially published WotC resources, including named NPCs in published adventures or DDAL (Adventurers League).
As of now, according to a search on DnD Beyond, there are two creatures who win at CR 3:
There is the Fleecemane Lion from the Mythic Odysseys of Theros. There is also Bol'bara who is from the Explorer's Guide to Wildmount. There are some specific requirements for them to have legendary actions which are mentioned in mdrichey's answer. Thanks to mdrichey for finding this option in the first place.
Below is my previous answer prior to the release of Wildmount:
There are two creatures tied at CR 4 that have legendary actions:
The Yestabrod from Out of the Abyss and the Thessalhydra from Hunt for the Thessalhydra.
There is also the honorable mentions of the Merrenoloth from Mordenkainen's Tome of Foes; a CR 3 character with lair and regional actions though no legendary actions.
There is also, as mdrichey points out, the Unicorn at CR 5 from the Monster Manual, who has legendary actions, is not from a specific module, and is not a specific (single) character/creature. Thanks, again, to mdrichey for bringing up the Unicorn as an option/example.
The adventure "Unwelcome Spirits," contained in Explorer's Guide to Wildmount, contains a CR 3
goblin warlock
named Bol'bara, who has legendary actions when she
is fully possessed by her patron, the shadow demon known as Trush.
Medix2's answer mentions a couple of CR 4 monsters from other published adventures that have legendary actions. I think it is also worth mentioning that the lowest CR monster with legendary actions that is not tied to a specific published adventure is the CR 5 unicorn.