One technique to use if the camera is having trouble auto focusing is to put the camera on focus lock (which often comes with exposure lock as well). Then the camera will stop trying to autofocus and you can just move the phone slightly further or closer to the subject until the focus is correct.
I’m not sure how to focus lock on Android, but on iOS, just keep your finger on the subject for a few seconds. It takes some practice but it can be really helpful.