Yes, there are limitations on the working hours for pilots and cabin crew. The exact regulations depend on the flag country of the airline.
A description of the EU (EASA) rules:
https://www.flightdeckfriend.com/how-many-hours-can-pilots-work-in-one-day/