Where can I learn online to knit a sweater?

Find a pattern and knit it; it will have everything in it you need to know. How many to cast on, what stitches to use, where to do the shaping and everything.

I came across a series of videos I found helpful. You might want to check them out.

I’d already jumped in and made sweaters so I’ve never actually gone through step by step with the videos but got some useful tips from her.
Enjoy knitting a sweater, it’s really rewarding.

I’d suggest you start out in small steps. If you know someone that is having or has a baby, knit a baby sweater. They don’t use much yarn and it’s good practice. The simplest sweaters I’ve found are two rectangles for the front and back and two rectangles for the sleeves. It has a simple boat neck. Lion brand yarn has excellent patterns for beginners. Be sure to input your skill level in your search or only look at the ones for beginner level. They should be labeled at the top of the pattern. Once you do a simple sweater, you can graduate to more complicated ones. They also have sweaters knit in one piece and ones which are knit from side to side. Good luck.