No, babies don’t need to have a nursery, and many people choose not to have one. In fact, the AAP recommends room sharing for the first year, if possible. This means your baby should have their own safe sleep surface in your bedroom (source).
However, your child will eventually move to their own room. Having a separate space in advance for dressing, changing, rocking, reading, and playing with your baby will make your little one more comfortable when they do make the big change.