If I get cataract, can I cook all time?

For a while. Cataracts cause a slow progression of loss of visual capacity. For some it is not so slow. You can cook and do other functions in your life as long as the density is not too great to interfere visually. This includes cooking which may involve reading a recipe, identifying and measuring ingredients and monitoring the cooking food.
Cataracts. Will cause gradual changes in your vision. As long as you can see well enough, there are no restrictions in what you do, including cooking.
Yes. You can usually resume normal activity shortly after cataract surgery. You can likely cook a couple of hours after surgery if no pain or risk to eye: check with your eyeMD.
Depends. You should have your cataracts operated on cataracts when they affect your activitities of daily living. "you have problems doing things you like, or need to do", or there is medical reasons that the cataracts should be taken care of (causing glaucoma!). There is no set vision (i.e. 20/40 or 20/50) that indicates you should have surgery. You should have symptoms, or need to pass drivers exam.
Yes. Cataracts certainly affect vision, and in fact, are the leading cause of treatable worldwide blindness. If you are able to perform the necessary tasks of cooking without discernible difficulty, then your cataracts should not stop you. If they progress, and other conservative measures like glasses don't help, then cataract surgery may be the way to go.