The Boolean modifier has problems with non-manifold geometry. Without going into complex discussions what exactly is manifold and non-manifold, I simplify it to say: non-manifold geometry is something that cannot exist in reality.
When editing meshes these are for examples the components on their own, the vertices, edges, faces. Vertices and edges do not even have a surface, and a face has no thickness. This is not possible in reality, even the thinnest foil has thickness to it.
To create a mesh that resembles a real object, you have to model a closed or watertight mesh, something that encloses a volume in some way and all face normals have to point "outwards". A closed mesh needs a minimum of 4 faces, all its vertices have to be connected to a minimum of 2 edges, and each edge is connected to exactly 2 faces - no more, no less. But let's take an easy example with 6 faces: the default cube.

All faces show blue, i.e. their face normals (the cyan lines) are pointing outwards. Everything is connected, there is no loose geometry, no additional inner faces, every corner vertex is connected to 3 edges, each edge connects 2 faces in a 90° angle. Subdivisions can lead to vertices having 2 or more than 3 edge connections, but that would be okay.
Now moving on to a torus or donut shape. Also a very simple version, just four segments:

This is also a manifold mesh. Everything is showing blue, no edge has more or less than 2 face connections. Even the hole in the middle is not "open" - because the walls of the hole are facing outwards to the environment, just like all the other faces of the mesh.
If you would now select the edges on top and bottom of hole and fill them with F, you create a non-manifold mesh:

First of all you can see that the new faces have their normals or their blue sides pointing inside the hole, so that looking at it from the top or bottom, the new faces show red. The reason for this is, when you fill this, the normal could either be pointing away from the hole or towards the hole. Away from hole there are no surrounding faces for reference, towards the hole there are faces and they are blue, i.e. indicating they are the outside of a mesh. Therefore the new faces will have their outside be the insid of the hole.
Okay, sounds confusing. But no matter if they would show red or blue (you could flip them to show blue), they would still be creating non-manifold geometry. Their edges connect more than 2 faces, they have 3: the top face, the face inside the hole and the new face. Although (when flipped) this would be a closed mesh, you then have inner faces which are not possible in reality. That would be as if walls separating rooms in a house would have no thickness - that's impossible.
To make this mesh manifold, would have to delete the inner faces remaining inside the hole.
And the reason why this non-manifold mesh can make problems with the Boolean modifier is that calculating Boolean Difference, Union or Intersection depends on determining where the inside and outside of combined meshes are, what remains, where new outside faces have to be generated when cutting away something for example and so on.
Since with non-manifold meshes there is indifference or room for interpretation, the modifier results might not always meet your expectations of how this should be resolved, and the different Solver options whether you use Fast or Exact and their settings might get you what you want, but eventually not.
By the way, the explanations are all assuming you have everything connected. No duplicate vertices, no split edges, everything merged together. If for example the default cube had all edges split, this would just be a bunch of planes arranged in a cubic shape, and a single-face plane is non-manifold, because the boundary edges are only connected to 1 face.
Fcreates non-manifold geometry. Also inveted normals can cause problems with the nodifier - like the red ones in your screenshot. But even if you flip them, it's still manifold geometry. $\endgroup$