The perennial parenting issue, we are still dealing with our daughter (who will turn 4 this week) often joining us in our bed between 1&3 am - we have a plan of action but waiting until we return from a long upcoming vacation. Vacations always seem to disrupt their sleeping routine, first week back is always a mixed bag of interrupted sleep
Our son was the classic nightmare scenario in that we barely got a normal night of sleep until he was 10-11 months old, the worst time of my life. But it got better once we found a consistent routine and stuck with it
Patience and a regular routine is the general guidelines for ensuring proper sleep habits for kids - I'm sure you've read about the sleep cycles, no pre-bed screen time, sugary foods/drinks etc. but key is routine, sticking to that routine and while mixing it up never let them get into your bed (Like we have with our daughter). It's the cardinal sin that is hard to undo without serious patience because it takes time to undo it
But consistent routine, even involving them in the planning - good luck, it passes but painful until it does
And if it's any consolation, my impression is that most parents lie about how well their kids sleep - if you went by word of mouth, it'd seem no one has any sleep issues when it is the single biggest complaint pediatricians hear about