It's significantly more powerful than other AOE cantrips, but wouldn't be gamebreaking if balanced as part of a specific race
One spell you could compare it to another cantrip that does AOE damage: Thunderclap (Elemental Evil Player's Companion, pg. 168):
Range 5 ft
You create a burst of thunderous sound that can be heard up to 100 feet away. Each creature within range, other than you, must succeed on a Constitution saving throw or take 1d6 thunder damage.
The spell’s damage increases by 1d6 when you reach 5th level (2d6), 11th level (3d6), and 17th level (4d6).
How does your spell compare:
- Long range (60 feet, vs focused on yourself)
- Also has the chance to deal 1d4 damage to one target on hit
- Does not have the penalty that the blast can be heard from 100 ft away
- Less damage (d4 die, vs d6)
- Dex save, vs Con save
- Requires material component
- Piercing damage and thunder damage are both extremely unlikely to be resisted. While many creatures have resistance to "Bludgeoning, Piercing, and Slashing from Nonmagical Attacks", this is a magical attack so it would bypass this resistance.
The cantrips Sword Burst (SCAG p. 143) and Word of Radiance (XGTE 171) are nearly identical. They keep the d6 damage die and the 5 ft range centered on yourself, but switch the save (DEX and CON respectively) and the damage type (force and radiant respectively). This appears to be the standard for a balanced AOE cantrip.
Your spell is significantly better: the reduction in damage from the smaller damage die (which only reduces average damage per target by 1) will generally be outweighed by the chance to damage the primary target twice, while the long range makes this much safer to use (to make good use of damage from Thunderclap, you need to be surrounded by enemies).
It's not hugely overpowered on its own (unless a clever player comes up with synergies that I'm not thinking of now) and if it's a racial feature, it may be alright so long as the race is balanced by being weaker in other ways.
If you want to make it more balanced with other cantrips, I would do some the following:
- lower the range (the 20 ft range for a thrown flask of Holy Water seems like a good figure)
- remove the primary target damage and attack roll (this also has the benefit of reducing the complexity of the cantrip)
Even with those changes, though, it's still going to be more slightly powerful than Thunderclap unless you add an extra downside (maybe the cactus can be caught and thrown back?)