I feel sharp, sudden pain on my lower rib cage (right side) few times. What could cause this?

Maybe pleural pain. Under the right rib cage, or part of the rib cage, are the liver, gall bladder, first part of the small intestine, the muscles between ribs, the diaphragm, the linings of the ribs and the lungs, etc... Sometimes it is irritation of a nerve, or of pleura (the lining of the ribs or lungs) that leads to brief sharp pains. A doctor can examine the area if symptoms continue, increase, or are worrisome.