https://www.hometalk.com/26463433/old-door-headboard?expand_all_questions=1 this should give you some ideas -
Clean sand, paint or decorate then install sideways behind your bed.
You just need two posts for the sides and router a slot in the posts and slide the door into the slots. Or you can attach the door directly onto the wall.
We made an old door into a headboard and here is how we did it. https://www.homeroad.net/2012/06/old-door-headboard.html