Putin’s government was warned weeks in advance and dropped the ball badly. Now they need to turn bad press into useful press by placing blame on Ukraine so Russia stays focused on that war. I sincerely doubt they have the military power available to start meaningful reprisals against Islamic State in Afghanistan.
I don’t know - it’s possible as I’ve heard of Islamic State being linked to several nations. However, OP’s article mentions Afghanistan specifically:
“A U.S. intelligence official told The Associated Press that U.S. intelligence agencies had learned the group’s branch in Afghanistan was planning an attack in Moscow and shared the information with Russian officials.”