I don't disagree with the other posts because they're not wrong, but a few things I find work (relatively speaking, because I can't get my channel to grow much myself as I lose a follower for every two I get because of "toxicity" and anti-woke content):
Have a personality. It can be a shtick like DrDisrespect, or it can be genuine. Even if you're just an awkward nerd, own it and live it.
Get a webcam. I don't always stream with a cam (especially if I'm just doing a few hours after work), but when I'm doing bigger games or my 10+ hour sunday streams I do. And I always get more people with a cam than without.
Avoid dead air. Unless you're watching a cutscene or important dialogue you should keep a running commentary up, whether it's about the game and what you're doing or it's with chat. Dead air is fucking annoying and it gets me to click off a channel immediately. Just as annoying as "no commentary" youtube playthroughs.
Speaking of that, interacting with chat is key. Few things get me to leave a channel quicker than when I try to talk to the host and they don't even acknowledge my comments (I'm talking about small streamers, not huge ones that it would be impossible to read and shout out everyone). I understand sometimes people get in the zone, but there's no excuse when you're sitting in a lobby waiting or checking the after-action screen. It's not easy to keep one eye on chat and the other on the game, but you get used to it.
Invest in decent gear. Get a good mic, a good cam, and a good PC or game capture setup. You don't need top of the line, but if you want to set youself apart from the other thousands of zero-viewer channels you'll need to invest.
Learn to deal with trolls. Needless to say I seem to get more than my share of reeeee-types that want to fuck with me. I tend to let people make fools of themselves unless they start getting into territory that might get my channel a strike.
Play games people want to see. My big problem is I don't play competitively and I don't play "popular" games like Fortnite or COD or whatever the flavor of the month happens to be. Also if you want people to come back you'll have to stick with a few games. Variety streaming is a lot harder to keep people when you're starting out.
Network! Thank each and every chatter by name. Thank people for raids, hosts, subs, donations, etc. And when you're done streaming, raid and host other people.
Get a few "hype men" in chat and make them mods. Something to keep the other viewers entertained during the lulls in action or bathroom breaks or something. Also it just looks better having more chat than an empty chat.
When you're not streaming, stop in to chat with other streamers.
Don't be afraid to ask chatters what they think would help the channel. Could be game suggestions or contests or something else.
Be consistent. You need to stream often. It's a numbers game. The more you do it, the more opportunity to get new eyes on your channel. You'll probably need to try different times and days to find that sweet spot. You can't do it a week on and a week off when you're starting out or you won't get any traction. Make a schedule and stick to it.
I'm sure I can come up with more, but this should be enough to get you started.
One other thing: Check your settings often. Make sure your bitrate is solid, make sure the audio and video are clear and balanced. When I first started I went almost an hour of streaming with people coming in and leaving and I couldn't figure out why. Somebody finally said "dude, your mic is off!" Fuck.
You'll probably need to turn down the in-game music on most games as a rule. And watch copyright strikes!
And one more thing: Don't do it for the money. Don't expect to quit your day job, ever. I get enough to buy a few new games and maybe gear upgrades but I can't imagine ever making enough to support myself.