It depends what mode you're playing in, if it was solo, I recommend putting a light layer protection around your bed, maybe wood or endstone. Then I'd say rush to the nearest neighbor you got and take them out, after that go to the next enighbor correspoding from that person's island. If it were doubles, 3v3, or 4v4, I recommend 2 people defending the bed at all times while the other two rush to get beds and the other get diamonds. I only recommend defending your bed hard if it were with teams.
This is coming froma 102 star bedwars player..