"In" is basically within, inside a container or box, maybe an enclosed space but not necessarily.
"On" is related to surfaces.
You can use "in" or "on" in the same sentence, but the meaning would change.