Though quite rare and all of what has been available has typically been very targeted, there is malware for iPhone. Pegasus was one such example, and there are others.
Far more commonly, there are advertisers that pretend to be malware or that pretend to find malware.
You have the latter case here; advertisements.
There’s nothing “hacked” or “infected” here, “just” an added calendar.
Somewhere along the path, you were offered and accepted a calendar subscription, and you are now getting those calendar events filled with advertising.
Delete the subscribed calendar, as was mentioned above ➡️ Delete spam calendars and events on iPhone - Apple Support
Where most folks get in trouble is not with “viruses” or “hackers”, but with scams ➡️ Recognize and avoid phishing messages, phony support calls, and other scams - Apple Support