The answer is yes & no.
If your technique is incorrect, you will instead work your hip flexor muscle (This is a group of muscles at the front of the hip that helps you move and flex your leg/knee up towards your body) instead of your lower abs.
Here are pointers when doing hanging leg raises to target only your lower abs:
1. At starting position, stay relax. Do not ‘kek’ or tighten your core.
2. Bring your knees all the way to the top touching your chest.
3. If the exercise gets easier, straighten your leg & raise it.
4. Use lifting straps to remove partial effort used for gripping when hanging yourself as it allows more hangtime thus focusing on working the abs, rather than your forearms
Your fitness pal