I am trying to familiarize myself with Pathfinder 2e, which is also my first role-playing game in which I will be actively participating in live sessions. I am interested in creating a 1st level human Warpriest of Sarenrae, but I am having trouble figuring out the advantages and disadvantages of melee combat, since a cleric can provide assistance either through his weapon or through his divine magic.
Specifically, my deity's favored weapon is the scimitar, which for my character deals a damage of 1d6+2 (my strength's ability modifier). I have a +5 in a d20 roll for that weapon (my strength's ability modifier plus "trained").
On the other hand, I have also chosen Divine Lance as one of my cantrip spells, which is explained on page 331. Also, my Spell (Divine) DC is 17 (Wis +4, Prof +3):
Traditions divine
Cast [two-actions] somatic, verbal
Range 30 feet Targets 1 creature
You unleash a beam of divine energy. Choose an alignment your deity has (chaotic, evil, good, or lawful). You can’t cast this spell if you don’t have a deity or if your deity is true neutral. Make a ranged spell attack roll against the target’s AC. On a hit, the target takes damage of the chosen alignment type equal to 1d4 + your spellcasting ability modifier (double damage on a critical hit). The spell gains the trait of the alignment you chose.
Heightened (+1) The damage increases by 1d4.
My question is, since I can cast that spell as many times as I want during a fight, why bothering using my scimitar? I imagine that being a Warpriest, using melee in combat would provide some advantage at least under certain circumstances, otherwise I see no point in selecting this particlar Doctrine instead of Cloistered. I would love to play a cleric of the kinds of Kyra but I am struggling to find a decent build suited for that role.
Perhaps it's due to my total lack of any experience with RPGs that I am overthinking it too much. However, If someone could point me in the right direction I would highly appreciate it.