Wife took away my 1 year 6 month son away

I got a call from my local police station (Rishikesh) yesterday at about 1.30 pm (23.12.2020). The station house officer told me over phone that my wife and her parents have approached the police for some matter. In the police station the SHO told me that my wife wants to take my son with her to her in-laws because she fears that I might harm my son or my wife. He also told me that I have no rights till my son is 3-5 years of age and mother can take her son anywhere without my permission. Although no formal complaint was registered against me for domestic violence as alleged by my wife and her in-laws, I was made to sign a document in the police station which stated that I agree to the fact that my my wife will take my son with her for a few days and both of us will appear for a counselling on 18.01.2020. Two policemen were sent to my house and my wife left with my son for Noida to live with her parents. I am engaged in a marital conflict with my wife since some time and believe that my wife is using our son as a weapon to teach me a lesson because she knows that I love and care for my son. I feel that my wife won't return with my son because she has quit her job in Rishikesh. Did I do the right thing by amicably letting her leave with my son? My son is 1year and 6 months old. What can I do to prevent her from keeping my son away from me without a formal divorce or separation process in place.