If you have an event with a limited number of seats, you can directly in your Back-Office > Manage tab > Event website > Website settings click on the "Set a maximum registrations limit" trigger.

Once this feature is activated, registrations will be blocked as soon as the number of confirmed participants has reached the set threshold.

You also have the option to specify a phrase that will be displayed once the quota is reached.

If your event is paid and you have a ticket office, you can follow this tutorial: Configuring your tickets to also limit the number of available seats per ticket.