"Gallery" is an app that shows everything the multimedia scan that occurs when you turn the phone on picks up. The phone may not be doing another scan when you take a picture (a scan on a phone with a lot of storage can take a long time), so the picture won't show up in Gallery until the next time you turn the phone on.
Or you may not be telling the camera app to save the picture. Or you may not have enough free storage to save another picture. Or other things in lower order of probability.
Without having the camera in hand, looking at a few things internally (in software) and trying a few things, there's no way to give you a "one diagnosis fits all" answer. That's what repair shops are for - problems that have a few "could be" causes.