The use of hand sanitizer is not bad for your immune system.
Using hand sanitizer is a good way to get rid of and kill germs and viruses that can be on your hands when you don't have soap and water available.
But you should still wash your hands and arms and even face with some soap and water when you do get to a water source and have water and soap available.
Hand sanitizer when overused could dry out your skin but it's not gonna weaken your immune system.
As long as you're eating healthy and getting plenty of Vitamin D and Vitamin C your immune system should be working properly.
It's good to be exposed to some germs though because it helps your body build immunity.
But you should avoid people with very bad illnesses and especially any new virus that there is no vaccine for.