First thing you need to do is log in to your WordPress site and go to Settings » Discussion. Scroll down to the Avatars section and uncheck the box next to ‘Show Avatars’ option. You will need to click on the Save Changes button to store your settings.
For more you can visit:
https://www.wpbeginner.com/beginners-guide/how-to-disable-gravatars-in-wordpress/#:~:text=First%20thing%20you%20need%20to,button%20to%20store%20your%20settings.