How to fill cracks when building wood furniture?
Good for you for tackling this project.  If you're an amateur and this is your first project, then don't try to be perfect because you will be beating yourself up for no reason.

If you are going to paint the finished project, then the looks don't matter so much.  You can buy wood filler that will fill any gaps and grain.  Force it into any gaps or cracks with a putty knife, and then sand smooth afterwards.   If needed, start with a coarse grain sandpaper (otherwise start with medium) and then progress to fine.   Wood filler can create fine dust, so use a dust mask while sanding.   For panels, I would recommend using MDF as it has a very smooth surface for painting.  Cutting MDF creates a LOT of dust, so always use a mask and remember that it's better to do this outside or with a dust collection system.