How to create routine for 3 year old

I will admit we have never really done a bedtime routine or anything similar with our son who will be four in March. We both worked shifts and life was hectic, we tried a few times but gave up after a week because we couldn’t stick to it. Now I stay home full time and we would like to get our son on a schedule to prepare him for school next year, a set bedtime is where we want to start. I just don’t know how to go about it. He goes to sleep at random times, 11pm, 9pm, 6pm, whenever he falls asleep is his bedtime right now. Honestly he also falls asleep with a tv playing bedtime songs and stories and we would like to figure out how to stop that too because I know it’s not the best for him. If I could have some advice on how to get him off the TV and how to get him used to bedtime and what a good bedtime would be for his age please, I know I may be judged for how we have been doing things but I know we need to do better so constructive criticism only please.