Exactly. Zooming digitally while taking the picture results in the phone eliminating a portion of the pixels around the perimeter of the center of your zooming point. What you are left with is a lower resolution image, that will appear more grainy.
Allowing the phone camera to capture the image with zero digital zoom at the closest physical distance you can position the camera from your subject while still getting a true focus will yield the greatest density of pixels and the highest resolution image to start with. From there do any zooming and cropping you need to in order to frame the final image as you require.
For example, here are 5 images of the same keyboard from shots taken with a Samsung S7. The first is 12MP with no digital zoom. The second is at 8X digital zoom. The next image is the zero zoom image cropped to the limit of the editing software. Then that cropped image is cropped again to show only the 'A'. The last is the 8X zoom cropped to the same size to slow just the 'A'.
1)
(3.48MB)
2)
(1.77MB)
3)
(178KB)
4)
(10KB)
(Tap to view)
5)
(320KB)
Since the digital zoom cuts down significantly on light gathered the digitally zoomed image is darker, less white and has less contrast. Aside from the obvious color, brightness and contrast difference, you'll notice how much smoother the zero zoom cropped image is compared to the 8X zoom cropped image. You'll also see significantly less graininess in the zero zoom cropped image overall. Remember, these were both captured with the same camera lens and sensor, and under the same lighting conditions. The only thing changed from image 1 to image 2 is 8X digital zoom in image 2.
Now, simple cropping of the images does reveal one important difference in the images. The digitally zoomed image (#2), actually looks less vibrant than the cropped image of the one that isn't digitally zoomed (#3), but you'll notice that once they are both cropped to the same size the digitally zoomed image (#5), actually looks more natural than the non-zoomed image (#4).
The reason is that in order to get to a comparable visual size the non-zoomed image had to be cropped twice while the zoomed image only needed cropping once. That second cropping severely reduced the non-zoomed image's data size (see sizes listed under each image).
Sent from my SM-G930V using Tapatalk