categories of custom post type shows in CMS but not in the frontend webpage

It seems like you got a permalink conflict. You can’t give two “things” the same slug/URi in WordPress. Please try it with a different slug than events either for the custom post type or the custom taxonomy.

And yes, I know, this answer will be flagged as “low quality” due to its length.