Let me quickly go over how you can get this item, and some tips on making it easier.

Jangmo-o, Hakamo-o, and Kommo-o can hold Razor Claws

These are the only Pokemon that can hold a Razor Claw, so you can catch them, or use Thief to steal it.

You can find them in Vast Poni Canyon on Poni Island, the 4th island, after completing all the Trials.

There is only a 5% chance for Jangmo-o and Hakamo-o to hold it. Kommo-o has a 50% chance, but this is final evolution of Jangmo-o.

Get Compound Eyes

An easy way around this is to get a Pokemon with the Compound Eyes ability and one that can learn Thief.

Compound Eyes greatly increases the chance to encounter a wild Pokemon with their held item.

Luckily there is a very easy to get Pokemon that has both of these: Butterfree.

Just catch a Caterpie or Metapod, which can be found as early as Route 1, and evolve it into Butterfree. You can also find them on Route 3 and 5.

Now that you have one, make sure it is in the first slot in your party. You can either level it up, or just use it increase your chance of finding the item.

When it finally comes out, just use Thief or catch it. If you catch it, you will be able to see if it has the item before sending it to the PC

If you use Thief, make sure you are not holding an item. You cannot take items if you are already holding 1. 

That’s all you need to get the Razor Claw Item in Pokemon Sun and Moon. Let me know if you have any questions!