のが is used for nominalization, which turns a verb into a noun. For example, I could say “singing is fun”.
歌うのが楽しい。
うたうのがたのしい。
[To sing] [act] [fun-is].
勉強する is called a する verb, meaning that the noun “study” can become a verb without needing any particles like を in the middle.
Some nouns aren’t する verbs. For example, しゅくだい is homework. If I wanted to say “Doing homework is hard”, I would have to use a particle. In this case, it would be
[しゅくだい]を[するのが][むずかしい]。
[Homework] [doing-act] [hard-is].
There may be specific rules to know when something is or is not a する verb, but I’m not sure what they are.

