I use plastic containers with the kind of lids that have a vinyl seal inside and clasps on the outside for all dried goods, or if I don't have sufficient of them large glass jars with screw-top lids, or tins with tight-fitting lids.
That prevents weevils, food moth etc.
You asked what else you should do: make sure there are no crumbs, grains of rice etc stuck between the side of the shelves and the cupboard or the sides and bottoms of the drawers.
Mice are not a problem, as I am in the happy position of owning a queenie cat who devotes two mornings a week to keeping down the outdoor mouse population, and no mouse who tried to move in here would live long enough to eat anything.
Trubel does not, repeat NOT approve of mice, except as a freshly caught mid-morning snack.