What do you do if you picked up your hermit crab while molting?

Put it back down immediately! They cannot be disturbed during this process because even the slightest bit of stress can kill them. They burrow underground and molt there which can take weeks to months. No matter how curious you are, never dig them out. I would suggest to not mess with him anymore