What's he barking at? Is he barking for attention? Or barking at people/objects?
To stop being the centre of his attention, you need to get him to learn to entertain himself. I always had my dogs outside of the creates when I hoovered/cooked/read on the sofa etc, just so they got used to be doing other things that didn't involve them. It's hard at first as they cry, jump up and bark at you - but they learn. Relaxing, even if it's just following you from room to room whilst you do things but not pestering you is something that they do learn over time but ignoring them when they whine for attention whilst you are doing things is, IME, 100% to get them to learn.
But please, don't feel bad! I've had dogs my entire life. I had two when I got my current puppy (18 months, so still technically a puppy) and I spent a good two months wanting to return the little turd - and I 100% knew what to expect. Sometimes I still think about retuning him. He's lovely. Really perfect in every way. But he's still a dick. They're AWFUL as until they grow up.
But it 100% does get better. They get better about 4-6 months then reverts to being arseholes for another 10 months, then improve again IME. By 18 months (breed dependent) your puppy will be perfect - or close to.