We are talking about a many-to-many relationship here, so your users() relationship is incorrect, you have to use belongsToMany(...) as well.
After that you can make use of the factory methods to create users, events and their relationship.
/* Create 10 users, each user having 5 events */
User::factory(10)->hasEvents(5)->create();
https://laravel.com/docs/8.x/database-testing#many-to-many-relationships