First of all thank you everyone for the responses.
I finally figured out (with the help of other forum members

) why my torpedoes did not explode and now I will share my experience and knowledge with everyone here and most importantly with new players who have the same problem. I use the automatic aim of the game without dud torpedoes.
1. Range - the target ship must be between 400-500 meters away from the U-boat. After shooting torpedoes need at least 300 m distance to arm themselves, if you are 300 m away or closer they will not arm, hence not explode.
2. Angle - your position should be (ideally) perpendicular to the ship but some angle say 120-140 degrees is not fatal. Do not shoot the ship from behind or from impossible angles - I had an occassion when I shot a ship directly from behind - the torpedo hit the propeller of the ship and nothing happened. Same thing if the ship is coming straight to you. The angle is bad and you will most likely miss.
3. Torpedo preparation - in the TDC (you can see its icon in the left upper corner of the screen) you will need the (four I think - two big, two small) right upper adjustment knobs (??? can't find a better word):
- select a tube - it can be first, second, third, etc.
- select torpedo depth - I choose 3 meters, choosing 4 m, 5 m or more is not good since the torpedo can go under the ship.
- select torpedo speed - I choose medium (or fast) - that way the ship can't escape my torpedo.
- select type of explosion - impact or magnetic. I choose impact (the torpedo explodes on impact) since magnetic is less reliable (at least at the beginning of the game in 1939) and may result in explosions before the torpedo hits the ship.
- open torpedo tube - press Q on the keyboard - it speeds up the shooting of the torpedo, if you don't press it first then there is a 3-4 second delay, which sometimes may matter.
- shoot!
This method has given me nearly 90% success rate in shooting ships.
I hope this helps. Good luck hunting!