There are many tutorials on Youtube how to play defense in NBA 2k19. I am having problems too.
Some tips:
1) Use defensive stance (LT)...use LT and RT just like in a racing game to brake and accelerate and guard your player.
2) Standing in front of your player shooting does not do anything. Raising your hands is not effective either. In order to contest a shot you need to push your right stick up and release it! You can also edit sliders and raise the slider "user -> contest shot" to 100.
3) While guarding the PG with your PG activate icon switching...so if the other team passes to the center for example you can switch to your center quickly.
4) Disable ACE. Then change defensive settings to:
offball: tight
onball: moderate
baseline
go over
soft hedge
go over
soft hedge
go under
...
recommended by Popboy. Check out his video for the entire list of settings:
https://www.youtube.com/watch?v=aPufsAd97V0Check out his other videos too!