Found this small, hard, brown pill-shaped object behind my kitchen cabinet. It has a weird ridge on the side and looks like a dried bean. What is this?

Unlike beans or seeds, which are usually uniform in shape and lack distinctive ridges, an ootheca has a characteristic ridge along its side and is less uniform in its curvature.
In comparison to rodent droppings, which are generally softer and more irregularly shaped, cockroach egg cases are harder and have a more consistent size and shape. Observing these traits can help you conclusively identify the object in question as a cockroach ootheca.
6. Which Cockroach Species Lay Egg Cases Like This?
Several cockroach species lay egg cases, but the most