You can use the Wix Events element to display events on site pages. The element can be set to display a specific set of events or all the events in an event category .
The new API allows you to access the element in your code. Use the categoryId property to dynamically change which event category to display.