This is a tricky question, because there is no definitive answer. Whether or not you can break up a 4- or 6-pack, and buy a beer or two instead of having to ring up the entire pack at the register, is both up to the state and the retailer.
Some states, like New York, allow the individual sale of beer bottles and cans, meaning a customer can technically break a pack and buy a solo beer on its own, but that does not mean the retailer has to let you. For many retailers, the breaking of packs is a huge pain, because it means they’re forced to have to figure out how to sell a broken pack to another patron. Imagine heading to the store to buy your favorite 4-pack of hazy IPA, only to find that the remaining pack in the cooler was missing a can or two. Unless you were a super fan of the beer, you may opt to just buy a different, complete 4-pack of a rival hazy instead. And then, the sad, broken-up pack just sits on the shelf, getting older, losing flavor, and eventually getting tossed. This is what retailers and many breweries fear, which is why many dissuade the practice.
So, if you live in a state that allows the sale of solo beers, your best bet to ensure you can buy a solo beer or two and not feel guilty is to shop at a store that advertises they support the practice. Often, they’ll even have a cooler of single beers available for purchase. If not, ask before you take it upon yourself to break up a pack, because no one likes to see a fight at the register.