If you are looking for something other than an apelike creature, which other folks have rightfully pointed out would probably be the most straightforward answer, might I suggest a creature akin so a sauropod with a long, immensely powerful and whip-like tail?
In modern day, you can see tails being used as weapons by the komodo dragon, which can deliver powerful, stinging blows with its tail. If you were to make this tail prehensile (able to grip) or equip it with a scaly, scooping paddle, you could have the creature use it to launch projectiles at high speeds towards prey.
If the tail is prehensile, I would suggest the creature keep the tail curled up over its back. This will protect it from being grabbed or snacked upon by other carnivores. This creature would want to protect its tail since its the creature's primary weapon.
If the tail is a scoop, I'd suggest it be armored like an ankylosaurus. This would make it more multi-use and protect it from unwanted nibbling.
To have the attack be accurate at a distance, I think your creature would benefit from powerful binocular vision i.e. two forward-facing eyes. The better the vision, the better the aim!
I hope this helps give another option!
Resources:
Tails as weapons: https://www.nationalgeographic.com/science/phenomena/2014/01/18/tail-whips-and-face-bites/
Komodo dragon using its tail as a whip (they are not the only lizards to do this; also don't be like the humans in this video): https://www.youtube.com/watch?v=vQVJZzZ7tdY
Another lizard using its tail to defend itself from leopards: https://www.youtube.com/watch?v=BZ3C7srOMyc
Ankylosaurus: https://en.wikipedia.org/wiki/Ankylosaurus
Binocular vision: https://connectusfund.org/7-advantages-and-disadvantages-of-binocular-vision
Real animals with prehensile tails: https://en.wikipedia.org/wiki/Prehensile_tail
Example of lizard curling its tail: https://en.wikipedia.org/wiki/Curly-tailed_lizard