Generally, a voluntary statement to law enforcement isn't immediately unlawful, but its use in a trial is a complex matter. The key factor is whether it was obtained legally. Police must adhere to specific procedures, https://panchanandshaw.com/blog/contempt-law-guide/