How is the solar magnetic field produced? I have been trying to understand the magnetic field creation mechanism. I know that its origin is not perfectly understood, but what is currently believed (as I know) is that the magnetic fields inside the sun are generated in the rotational sheer in the tachocline, which are bouyant and rise through the convection zone, and eventually the magnetic field loops can be seen in the photoshphere as sunspots.
I struggle by imagining the "buoyant" magnetic fields going through the convection zone, does anybody have any good reference to understand the process and why the magnetic fields are considered to have certain properties like bouyancy?
I m trying to understand this production process as clear as possible.
 A: The Sun is mostly made of an ionized gas called a plasma.  The source of a magnetic field is the motion of charged particles (in the simplest scenario).  If you imagine the Sun is a roiling sphere of moving charged particles, some of which are more coherent and ordered than others, you could start to imagine that there would exist regions with a net magnetic field (i.e., regions with a net electric current).
Plasmas in highly ionized states and over large scales, exhibit something known as frozen-in or flux freezing phenomena (e.g., see https://physics.stackexchange.com/a/452325/59023 and https://physics.stackexchange.com/a/551944/59023 for more details).  The basic premise is that the plasma and magnetic field are "tied together" such that if one changes the other responds in kind.  Sometimes this is described as plasma bulk motions result in moving magnetic field lines (see https://physics.stackexchange.com/a/559759/59023 for an explanation as to why this is a poor phrasing/description).  The important thing is that plasmas can be mediated by both long-range forces (e.g., electromagnetic) and short-range, particle-particle collisions.  In the photosphere and below (i.e., solar interior) the plasma is not necessarily fully ionized and more importantly, it is collisionally mediated.  This makes it easier to treat/approximate as a fluid-like phenomena (e.g., see MHD).
Since nuclear fusion is the ultimate heat source in the solar interior and it is not necessarily uniform (nor is the transport of said heat), there are going to be differential bulk flows of plasma due to thermal pressure gradients etc.  In some parts of the solar interior, these flows can be so large they dominate all plasma processes (e.g., the convection zone).  Such regions are dominated by large-scale flows, which can generate large-scale magnetic fields.  Other regions can be dominated by other phenomena (e.g., radiation zone by electromagnetic radiation pressures or the photosphere which is where magnetic forces and bulk flow motions battle for dominance).

I struggle by imagining the "buoyant" magnetic fields going through the convection zone, does anybody have any good reference to understand the process and why the magnetic fields are considered to have certain properties like bouyancy?

If you think back to fluid dynamics, recall why a bubble or any object less dense than a fluid can experience a net force called the buoyant force.  It's basically a pressure gradient between the external fluid and the internal object that has a net magnitude pointed toward the surface of the fluid.
In a plasma, you have the usual pressures like thermal and ram/dynamic but you also have something called magnetic pressure (i.e., magnetic energy density).  If bulk flows result in the enhancement(depression) of the magnetic field magnitude, the enhanced(depressed) of magnetic pressure can lead to a decrease(increase) in thermal pressure.  Note that generally when the thermal pressure increases, the temperature increases much faster than the density.  There are several complicated reasons for this but the overall result is that such a region will end up being less dense than the surround plasma.  Such a region would experience a pressure gradient due to the gravitational potential (i.e., similar to the pressure difference at different depths under the surface of the ocean) and would thus be buoyant.
So how does this happen?  A pressure balance structure that accumulates more magnetic field than the surrounding plasma will result in a region with a reduced thermal pressure.  The reduction occurs by forcing the hotter particles out leaving a cooler region of plasma.  Conversely, if the region accumulates hotter particles then the magnetic field will decrease to maintain pressure balance.

...which are bouyant and rise through the convection zone, and eventually the magnetic field loops can be seen in the photoshphere as sunspots...

The formation of a sunspot is still an area of ongoing research however, the process is thought to be similar to the one I describe above were magnetic field intensity increases in some region below the solar surface.  However, how they reach the solar surface is the complicated part.  What is known is that once the enhanced magnetic field penetrates the surface, there can be a sort of self-enhancement of the magnetic field due to JxB-forces driven by convective flows.
Note that sunspots do not "pop-up" to the solar surface like a fishing bobber from below the surface.  They likely form from smaller regions of enhanced magnetic field that coalesce (e.g., see https://doi.org/10.1051/0004-6361/201117485 or https://ui.adsabs.harvard.edu/abs/2012A%26A...537A..19R/abstract if you hit a paywall) or from an actual downflow (not upflow) due to a suppressed total turbulent pressure and enhanced static magnetic pressure (e.g., see https://doi.org/10.1017/S1743921317004306 or https://ui.adsabs.harvard.edu/abs/2017IAUS..327...46L/abstract if you hit a paywall).
In short, the precise details of the formation of sunspots is still a topic of ongoing debate.
