Why re-invent the wheel?
There are two ways to do this:
How to Set App & Game Limits on Windows 10[
^] which uses parental controls, and Group Policies is another:
How to Block (or Allow) Certain Applications for Users in Windows[
^]
Other wise, you are looking at monitoring the processes list, and killing unwanted processes in a background thread - which while pretty simple has to be approached with caution as it may not be obvious what process(s) you need to kill. There is also the fun of keeping your app running at all times, which generally is very simple to defeat ...