This is largely a pure physics problem. Background blurring has to do with several things.
The distance between the subject and background. The more distance between the two, the greater the blurring of the background, and vice versa.
The distance between the camera and subject. The more distance between the two, the less blurring of the background, and vice versa.
The lens aperture, which is a bit more complex to explain. The larger the aperture, the more narrow the depth of field (I.e. The amount of area in distance from the camera that is in focus). Vice versa for this as well.
In the push for better low light ability, phones have had increasing larger apertures, which is noted by smaller f-stop ratings. The G3 has a fixed f/2.0 aperture, and the S9 is f/1.7 for their selfie cameras. That means that the G3 will naturally have a greater DoF due to its lens design, and there's nothing you can do about it in the S9 selfie camera. Your only option is to use one of the other two methods above. Because you're taking selfies, that may not be possible either. If you get close enough to a background subject like the pyramids, they won't all fit in the frame. Your arms can't extend to increase the camera to subject distance either, so that's out.
So really, you have one, and possibly two options for your S9. If you're not already, get a selfie stick to increase the camera to subject distance. If you're already using one and that isn't enough, then you'll need to either have someone else take the photo or consider a tripod at a distance if your phone allows gesture controls. For example, I can make a fist for my phone to take the photo.
Looking at the S10, it has a slightly smaller f/1.9 aperture selfie camera compared to the S9. It will do better than the S9 with having a larger DoF, but not quite as large as the G3. Hard to say if that will be enough to get the kind of shots you're wanting or not. The larger the aperture, the greater the DoF effect on a small change would be. For example, an f/0.1 change from f/1.9-2.0 may be large, but that same change at something like f/10-10.1 wouldn't be measurable.