Some headboards can stand alone without any support between the wall and the bed, but they need to have a depth to them that will allow them to stand without tipping.
It isn’t hard to make a headboard. They are a great beginner-friendly woodworking project. Most DIY headboard ideas can be made in a day. I built and upholstered my first headboard within two days, including nailhead trim.