The unofficial rule is that the office goes to the most recent former Speaker. Given that McCarthy is the most recent former Speaker, he took the office. It’s stated in the article.
So why was Steny Hoyer infesting a spot?