I don't remember ever making pinto beans that tasted bitter, though I've cooked old beans a time or two that probably just weren't worth eating. Maybe try again with new beans? If bean age isn't the culprit, perhaps it's the water. Hard water? Or the seasonings. Bitter spices or herbs? Sometimes smoked paprika seems a bit bitter. Maybe that's just me.
For pintos (and many other dry beans) I usually use the quick soak method. Sort through beans to remove bad beans and stones, rinse well, cover in pot with water a good way above beans, bring to boil, cook a few minutes, turn off heat, cover pan and let sit one hour. Drain and rinse beans. Cook beans with fresh water. I like to tell myself this helps with the gas. Did I mention my middle name is GAS? (Great Northern and Navy beans are super gas-producing fools. Pintos are bad enough, I guess.)
These days I typically cook pinto beans in my instant pot (at least once a week). I saute some onion in the instant pot. To that I add the soaked pinto beans along with water. For 3 cups (dry) pintos, I use 4 cups water to cook them after soaking. (For less soupy beans, cut that back to 3 1/2 cups water. Whatever, you want to at least cover the beans.) I add minced garlic and spices (no-salt sazon spice blend, cumin, Mexican oregano, liquid smoke); now and then I might add a sprig of epazote if I have it. I usually set to cook for 8 or 9 minutes at pressure. You might set it for less if you like firmer beans. After 20 minutes, I open and add salt. Most times I put the instant pot on saute after this to cook out extra water and make beans very soft. If beans are at a texture I like but are too soupy, I spoon out some of the liquid and reserve. I puree the beans in the pot with an immersion blender stick. I can use the broth I spooned out if the puree seems to dry.
They say the spice cumin is slightly bitter, but I like it. Maybe I'm just bitter.
Also, accidentally scorching beans might make them taste bitter. Just sayin'...