The difference is difficult and the linked question gives a decent explanation, but here is my two cents:
When you use 料理するのが
, it immediately feels like there is a direct actor involved. If you look at all the examples sentences in the link, when you use の
, it puts a focus on the fact that somebody is performing the action.
However, when you use 料理することが
, the focus is no longer on the actor involved, but the action itself. If I would translate the third sentence into English, it sounds to me like the following:
The act of cooking has become better.
I realize that the above sentence is unnatural English, but my point is that the difference between の
and こと
is whether the focus is on the actor or the action itself.
However, my above explanation might not fit every pattern, so I would take this as general advice. For example,
サッカーを見ることが好きです。
In the above sentence I am using こと
even though the act of "watching" has a direct actor involved. I believe the reason why こと
sounds better here is because the act of liking is focused on the サッカーを見ること
which is the focus of the sentence.