I use this caulk from Home Depot around my home (and in the video). It is caulk plus silicone so it has a bit of flexibility when dry, helping to prevent cracks or separation.
After filling the top gap, I used the same caulking process to fill the nail holes and vertical corner seams. Don’t worry if you’re not perfect at it. Stick with it and watch how fast you’ll improve.