Generally, a free statement to officers isn't immediately unlawful, but its use in court is a complex matter. The key factor is whether it was obtained fairly. Police must adhere to specific guidelines, including https://panchanandshaw.com/blog/court-receiver-appointment-explained/