Set Locators/Loop by Regions/Events/Marquee
Set the locators using the current selection.
Use the cycle area in Logic Pro — Apple Support
Set Locators by Regions/Events/Marquee: Sets the locators at the start and end points of the selected regions or events, or the marquee selection.