Never take shelter underneath a tree in a storm............
I once was caught in the thunderstorm while I was kayaking on a small river. It took every ounce of effort to remain in my kayak in the middle of the river with my body down and my paddle flat. The other option was to cower under a tree. Later that summer a young couple was killed doing exactly that (in another area).
A storm snuck up on me while I was on a fishing trip in Canada many years ago. There were 4 of us in 2 boats. We got to shore before the storm and lightning fireworks hit. We spread out on a beach well away from the boats and each other. We just toughed it out in rain suits. It rained so hard, it put out a forest fire that was smoldering in that part of the lake.
These days there are weather apps that show lightning in the area, but if you are an outdoorsman with no to spotty cell service, a lightning detector can be extremely useful.