It's entirely normal for babies to explore their bodies as they grow and develop.
When your baby discovered their hands, you may have noticed an increased interest in staring at their fingers. Followed by discovering their own feet, they similarly may have shown you sudden interest in reaching for their toes. The same happens around six months old when babies discover their genitals as another body part. As a result, they may reach for them during diaper changes.
How to respond
It's important to remember that this behavior does not indicate any sexual activity or inappropriate behavior. Babies are simply exploring their bodies as part of their natural development. Avoid big reactions or telling them no, as this could startle or confuse your baby.
Instead, maintain a matter-of-fact attitude, treating it as a normal behavior. Keep diaper changes calm and gentle, and if your baby's hands happen to wander, it's okay. You can distract them with a toy or a soft, soothing voice to help keep them engaged during the change.
Like any other developmental phase, this too shall pass as your baby grows and moves on to new stages of exploration and learning.