I have been told by more experienced farmers than myself that hens prefer a nesting box that is elevated about 18 inches or so, with a landing at the entrance for access and regress.
I have both wooden and metal boxes. My hens prefer the metal ones for some unknown reason.
This is my fourth...