Both should always be available; they’re not the same. (Obviously… they don’t have the same name.)
Grit can’t be dissolved; it stays in the gizzard and it’s used to grind food because chickens don’t have teeth. (Sorry, guys). Oyster shell actually dissolves in the gut. The chickens will self-regulate.
Concerning oyster shell, don’t worry about working out who needs what. As long as it’s offered freely, chickens will know to take it as and when they need it. (As opposed to their human parents, who eat things even when they don’t need to. Well, most of us, anyway.)