My observation is that everyone responds differently to major surgery, but the risks increase with age and physiological adaptation to a heart problem. My cardiac rehab nurses, who have seen thousands of patients, still attributed the condition to the bypass machine kicking up micro-emboli and particulates, despite there being some evidence in the literature that the bypass machine is not the culprit (or only culprit). MRIs typically show tiny spots in the brain being affected, sometimes more often in the frontal or occipital lobes, but the cerebellum is also affected, patients suddenly losing balance or having trouble with coordination. The brain can heal from these injuries, but establishing new neural pathways can take time. A neurophysiatrist thought it more likely the culprit was simply anoxia, which led me to consider the risks being higher for people whose vasculature has adapted to a heart problem, particularly over a long period of time. This would make it more difficult for the surgery team to ensure a consistent supply of oxygenated blood across the brain during surgery, particularly if the surgery was long. Deconstructing what happened to your brain has some utility to how you are going to deal with cognitive challenges, but for most people not having surgery means you are going to die, so not a lot of choice there.
Most people just try to find a good cardiologist and surgical team, and then follow their advice. The real choices are how you are going to deal with problems that arise after surgery. Not remembering where you put your keys is one thing, but not being able to read or struggling to understand what people are saying to you, requires a different level of response. Although it may be hard to imagine what short term or working memory loss is like unless you experience it, it only really matters how the affected person responds. It is extremely helpful to have supportive and patient people around you, but I found it very difficult to assemble the tools I needed to understand my problems and start to deal with them. I remember telling my cardiac nurse that the world was wrong, disconnected. I do not say that any more.
Some people in this forum have expressed fear of cognitive problems after their pending surgery. I think it is important to stay optimistic and connected to others like in this forum. People sometimes do not have the choice to avoid surgery, but you can choose not to fear. And there are lots of resources to deal with cognitive problems, resulting from major surgery, aging or a knock to the head.