It depends. There are a number of factors coming into play here, and although at the higher levels of competitive play people prefer Psyshock to be able to punch holes into Special walls, Psychic is generally more common. Psychic as a TM/TR is accessible to a lot more Pokemon, whereas fewer Pokemon can learn Psyshock, most of which are Psychic type.
Here are some factors to consider which is typically better:
Tier: If you're playing competitively with Smogon rules, tiers have a huge impact on movesets, simply because certain key threats are banned or staples of said tier. Some tiers tend to have more Pokemon which are defensively oriented, whereas others are more offense based. Further, some of the top defensive walls change from tier to tier, so in some tiers, Physically Defensive walls are a lot more common than Specially defensive ones. In which case, Psychic is obviously preferred. In others, of course, Psyshock is objectively better.
Psychic generally has more utility because the game generally has more Pokemon which are physically defensive, and the top 10 or top 50 all have very similar, high defense. Whereas Specially defensive Pokemon are somewhat rare (relatively) and the gap between the various Pokemon in the top 10-50 is a lot higher. For example, a Pokemon with 150 Defense and 150 Special Defense (Registeel) ranks #20 (tied with several) on the Physically Defensive scale, but only #9 (tied with a bunch of others) on the Specially Defensive scale. This, along with Psychic being more accessible to non-Psychic type users, makes it more popular. This in turn has a bias where most people simply slap on Psychic without even considering Psyshock because they see it used so much, they erroneously assume Psychic is objectively better.
Other moves in your moveset. The most common moveset for Psychic type Special Attackers is Calm Mind (or any relevant boosting move) + Psychic + Shadow Ball + Focus Blast. Of course there are some niche sets meant to counter specific sets, but this is the most general one. The problem here is that a Special Wall can tank Psychic well, but there are very few Pokemon which can reliably tank Shadow Ball and Focus Blast as well, and in most cases it's easier to spam all Special attacks. Of course here with Chansey and Blissey into the mix, Psyshock is a lot better, but versus a Reuniclus for example you will almost never go for Psyshock, choosing Shadow Ball instead. Aside from that, Scizor is a threat and most Psychic types either switch out or carry HP [Fire] for this. In case neither is an option, both Focus Blast and Shadow Ball are better as they hit for neutral damage whereas Psychic moves hits for half damage. The same applies for Mega Medicham and Mega Mawile, but of course with the ever changing meta this too has changed in the past few months (since Dynamax is in, and mega evolutions are out for the moment).
Role: What do you want your Psychic type attacker to do? For maximum coverage, Psyshock is better than Psychic because it takes your purely Special sweeper and effectively converts it into a Mixed sweeper (not exactly, but close). On the other hand, if you have a bunch of other strong Physically offensive Pokemon which can dent opposition and what you really need is some strong late game special sweeper, Psychic is the way to go.
Of course, the final decision is up to you, the player, and what your play style is. Whether you prefer to have balanced Pokemon that can act as jack of all trades, each holding their own, or whether you enjoy the synergy of team battling with lots of prediction and switching, preferring to use nukes to outplay and sweep your opponent. But to summarize, the answer is dependent on what sort of Pokemon you expect to encounter, what other moves you have on your Pokemon, and which other Pokemon are on your team.
And finally, it's is generally a terrible idea to have both Psychic and Psyshock on the same Pokemon, because coverage and hitting neutrally matters a lot, as some times, just a STAB boost doesn't cut it.