DS is a poor sleeper but has improved.
The first thing we did was make sure he had toys who 'look after him at night' now. Get their imagination to help them.
Second nightlight. He was more scared of the dark than we realised. This helped.
Third we talked to him and explained that now he was a big boy he had to stay in his bed. He is old enough to understand this. Emphasise big boys/girls do this. Are you a big boy/girl or still a baby?
Then make a point of bedtime. We made sure he knew what time bedtime was and he had to go to bed. He goes at 7pm because he's a poor sleeper and we know he is unlikely to go to sleep straight away. We tend to get up fairly late, so if you are early risers make it a little earlier.
Then he was barred from our bed. He can come in for a cuddle but he is now told he has to go back to bed. We got him to this point by marching him back every time he came in during the night. Just a firm take back to bed, good night and no more engagement. Repeat.
Then we moved on to tackling the going to sleep bit itself. The key for us, is every time he came down we gave as little attention as possible. As in no fuss, no argument, no extra cuddles. Just a straight 'right back to bed, goodnight' and leave. And just repeat. Part of the issue is getting attention so you have to disengage from that trap. If they scream and make a fuss the response is the same. Rinse repeat.
Finally back it up with rewards / punishment. With a really bad night, you say the morning after that was really bad, if it happens again tonight you lose X favourite toy. If they do it the next day, you explain that getting up constantly has lost X toy the following morning. Don't turn bedtime itself into the drama if you can help it. Once they have lost X toy you explain they have to do good behaviour to get it back. Go softly softly on this. So if the next night they still misbehave but its an improvement explain why you are pleased and that has been rewarded. But do get gradually more strict. If he's had a particularly good night, its commented on and made a fuss of, so the attention has shifted to the next morning with positive behaviour. He will occasionally get an additional reward if hes been good on this.
DS still plays up for an hour, maybe two in the evening. But we let him get on with it for the most part if he's rattling around upstairs. He only tends to get told off if hes coming downstairs with multiple exercises. As long as he's staying in his room, we tolerate it to a degree. He's usually asleep by 8.30pm / 9pm which isn't ideal but its much improved from where he was and he is giving us a break in the evening now.
The key for us, is don't let it descend into a battle ground because thats where you put the attention in. Engage in the right places not the wrong ones. Think about how your behaviour is fuelling the situation.
It takes time and you need to have realistic goals / timetable of how long it will take. Its not something you can do in a week.
We also are not too fussed about sticking to 7pm religiously at weekends now, once he got the idea. In fact staying up later on a Friday or Saturday is framed as a reward. He only gets it for good behaviour (including sleeping) the rest of the week. He doesn't automatically get it.
Its exhausting and stressful at first but stick with it. Make sure they understand the new boundaries you expect from them by repeating them and explaining them over time and framing the change as a part of growing up. 6 is old enough to understand this.
Good luck.