Co sleeping with a baby is not OK because the baby can die of SIDS.
If the baby is under 1 year old then they need to sleep in their own bed such as a baby bed with a firm mattress and no other soft bedding etc.
If a baby sleeps with you when they are 1 year old or under then they could die of SIDS which is never a good thing.
I've slept with my babies when they were 1 year old or under but only for naps and most times I would be awake.
It's a good bonding experience and it feels so great to have that baby near you but when you do go to sleep for the night be sure to put the baby in a baby bed or bassinet for safe sleeping.