How do you play blackjack as an advantage game?
First, memorize the basic strategy for your preferred game. For every hand you might have versus every upcard the dealer might be showing, there is a single mathematically correct play. You should either hit, or stand, or split, or double down. There are many options, but only one is correct. This is not a matter of opinion or following a hunch. It doesn't matter whether you think the dealer is "lucky" or is "running a streak". It doesn't matter whether the other players are "mixing up the order of the cards" by coming in and out or playing badly or switching how many hands they play. All that matters is the probabilities. There is a right strategy for your game, and the first order of business is to learn that strategy.
Is playing perfect basic strategy good enough to have an edge?
No, but it reduces the house edge to a very small percentage. If you play perfect basic strategy AND learn to count cards and vary your play and betting according to the count, THEN you will have an edge. But basic strategy is the foundation on which a winning blackjack strategy is built. Don't try to learn counting cards until AFTER you have learned basic strategy. Find yourself a book, a training program, or a website that has the info you need. Print up some flashcards. Then study basic and use it. Practice dealing out the hands and writing out the rules until knowing basic strategy and following it is second nature for you.