https://2e.aonprd.com/Deities.aspx?ID=184
Yaezhing (Minister of Blood)
Category Tian Gods
Edicts Commit assassinations for hire, strike unseen, carry out punishment for convicted criminals
Anathema Show mercy to a target, take credit for your assassinations, refuse to punish a lawfully convicted criminal
Follower Alignments LE, NE
Divine Ability Dexterity or Intelligence
Divine Font harm
Divine Skill Stealth
Favored Weapon shuriken
Domains death, duty, pain, trickery
Cleric Spells 1st: true strike, 2nd: invisibility, 6th: mislead
https://www.reddit.com/r/Pathfinder2e/comments/sl1tbn/what_is_the_best_build_around_the_assassinate/
Because Truestike, Invisibility, Silence, Organsight!
A wizard, or the grabbing silence spell feat as part of wizard dedication would let you cast these things quietly. (seriously, check out Organsight, and think about how your character would operate, then laugh very evilly)
Weirdly enough, a Bard could ALSO work for the same reasons.
Shadow sorcerer would as well, and they are pretty great as far as stealth goes.
Fetchling as a race would work super nicely as well, if you can take it, they have amazingly good stealth feats.
TL;DR: Casters make for good assassins, because rerolls.
Achaekek, God of Assassins gives True Strike and Invisibility too! It also provides the Zeal domain which gives you the 'Weapon Surge' focus spell, which ensures that the first strike you make is the only strike required.
Edit: Remembering this god took me on a bit of a journey, hence the longer post below.
To OP: Assassinate is very cool, but it's important to note that you must be unnoticed - not just hidden or undetected, they must not know that you even exist. Invisibility is great for that, as is Silence (2nd level) - cast them both on yourself and you're a ghost.
Also, it's worth noting that the Assassin dedication doesn't lose much if you don't take it at 2nd level but wait till later - not all the feats are critical to use the capstone ability, ironically. This means (assuming free archetype rules here) that you could take a different dedication first.
Eldritch Trickster is a rogue racket that assists you in taking a caster class dedication if you do decide to go down this route. This also means you're taking one less feat from Assassin as you can't take 'Sneak Attacker' as a rogue, but the debilitating strike options more than makes up for the damage you'd get from being a Precision ranger with an extra D6 damage. A thief also lets you maximise stealth, deception (for feint) and acrobatics (for abilities like Implausible Inflitration) so that you can ensure you can get behind your target unnoticed.
Finally, the Red Mantis Assassin archetype might fit nicely with all of the above, as you get a great spell selection, excellent weapons access, your stealth and assassin lore skills can be expert from 2nd level (as well as another skill if you go rogue rather than ranger) and it only takes three feats to get most of the benefits, after which you could switch to the Assassin dedication. It also pairs well, unsurprisingly, with the Mantis Scion background. It's easy to justify in any campaign if one of your parents was a Red Mantis and they took you from the island as a child to bring you up as 'normal' - then they die and you find their Sawtooth Sabres and realise who they've been praying to all this time.
Combining the Red Mantis dedication with Eldritch Trickster may take GM approval but the two fit nicely together.
Oh and one other benefit of casters is that they can use divination spells so that you can get your Mark For Death ability off early, without needing to be in the same room. Losing one whole turn at the start of a fight is painful, and even more so when probably the first turn will be spent hiding/going invisible so that you're unnoticed. A familiar is worth considering for this reason too as you can see and hear through their senses.