It takes a while!! Mine took about a week of really bad sleeps to slowly start sleeping longer in his cot. When I had clothes to put away, or a little tidy, I’d put him in his cot to chill, he’d watch me around the room and I’d leave to put clothes away in another room, so he’d be alone, and he eventually got comfortable in there and in his own space - that definitely helped!
My LO 4 months uses his cot well and we occasionally co sleep. My trick is to put a top that I’ve worn to sleep for a night or 2 in the cot for him to sleep on as all he needs is my smell. Give it a try.
Can’t help cos my nearly seven month old has never slept on his own more than five mins and will wake straight up since birth😂😂🙈🙈🙈