Firstly you should switch on the Gem Confirmation setting in the game. It is in the settings and will inform you if you are about to use Gems. Very useful.
There is no way that you can go back and historically find out where you used Gems.
If you are concerned, as you obviously are, then the only people that can help is Pixel Federation support. They should be able to tell you what you need to know. If you are saying it was a terrible mistake, then perhaps if you ask nicely , they may reimburse you and return your Gems. However this is not a "given"
How to raise a support ticket (https://portal.pixelfederation.com/en/seaport/support)
You should not write anything in the white box otherwise you will be directed straight back here. Choose a category and continue giving as much detail as you can.