For one, there is no space needed before the question mark in your question. But, yes, there are a lot of rules and learning them will be a great benefit.
I don't think there's any secret, overarching principle... I think you just have to learn how the different marks are used, and then either use them that way or make a conscious decision not to.
Since English isn't your first language, Varma, I recommend "The Elements Of Style" by Strunk & White. Starting in highschool and then college they made us have a copy in English classes in the U.S. Finding quizzes online will probably help... the more you do the more you learn. If you find them fun the way I like doing Logic puzzles you may find yourself enjoying yourself as you exercise the "muscles" involved. ETA: I googled for you and found this: https://www.gotoquiz.com/punctuation_in_english
1. Saw the barrels short. 2. Use right size shots. 3. Hang pages to the branches. (Paper. Not laptop, monitor or iPad.) 4. Aim. 5. Shoot. I'm not sure if that is the best method. (Your nick means "sure" in Finnish.)
For any writer, I recommend The Little, Brown Handbook as a handy style guide (yes, there is a comma between Little and Brown; they are proper names, not adjectives). For a more comprehensive reference for the finnicky bits, I recommend The Chicago Manual of Style.
I learned a lot about the nuance of punctuation use from Longknife and Sullivan's The Art of Styling Sentences, 5th Ed.
US MS Word or similar for US or UK English. It will show you most every error and suggest a correction.
I am someone who will admit to bad punctuation and grammar (although I don't need to because it's obvious in my posts). I found using a checker taught me quite a bit but I tend to just research on the internet. It's scary how we finished high school but still can't use basic English skills correctly. So I have to teach myself and it can get quite complicated.
This site is the best English grammar/punctuation site I've ever run across. It's not as comprehensive as some, but the examples and exercises (coupled with instant feedback) is amazingly good. As an interactive site, it really works. It teaches application of rules, rather than just giving a list of rules. If you have areas regarding grammar or punctuation that you're not sure about, this is where to go to work on them. http://www.bristol.ac.uk/arts/exercises/grammar/grammar_tutorial/index.htm