Crafting
How to make a bed and set your spawn in Terraria
Craft a basic bed with 15 Wood and 5 Silk, then activate the foot of the bed in a valid room.
Quick answer
Craft a bed at a Sawmill with 15 Wood and 5 Silk. Place it in a valid bedroom and interact with its foot until you see Spawn point set!

1. Make the Silk
Collect 35 Cobwebs while exploring underground. At a Loom, turn every seven Cobwebs into one Silk, for five Silk total.
2. Craft and place the bed
Bring 15 Wood and five Silk to a Sawmill and craft the basic bed. Put it in an enclosed bedroom with placed background walls and enough open space around the bed.
3. Activate the foot of the bed
Interact with the foot half to set your spawn. The head half is for sleeping on supported versions. If you get a room error, repair gaps in the background wall and clear space around the bed. Interacting with the foot again removes that spawn point.