Cavani came off the bench to score twice in the 3-2 win on Sunday.
Solskjaer said: "Sometimes, when we've scored goals, it had to be the 'perfect' goal, walking it in, with an extra pass and great skill.
"Edinson has been around the block and scored so many goals and played football for so long. He's been between those posts so many times, he's seen this game before, he's scored that goal before. He knows exactly where to move and his best friend in the box is what Sir Alex always used to tell me: 'Your best friend in the box is space', and he gets into that space with perfect timing."
Solskjaer continued: "He's had a great career and scored goals wherever he's been. He's so professional, so meticulous in his preparation, in his recovery, what he does at meal-times, before the game, during the game.
"So I was surprised when he didn't have his boots on when the second half started. Also, to have a focal point in the box is important for us, we've not really had that since Romelu [Lukaku] left. Anthony [Martial], Marcus [Rashford], Mason [Greenwood], they're different types of forwards. He gives us a great balance and a mix, so we wanted to mix it up and had an impact."