@narelly Yes you can disallow an entire folder by using a Disallow directive in the robots.txt file. For example if you wanted for all user agents (Googlebot, Bing, etc) to disallow a folder located at the root of your site name ‘Images’, you would include the following directive in your robots.txt:
User-agent: *
Disallow: /Images
Also, you can find out more about the syntax of robots.txt in our guide at https://yoast.com/ultimate-guide-robots-txt/ as well as Google’s documentation here: https://developers.google.com/search/reference/robots_txt
You can edit the robots.txt file using the Yoast SEO plugin by performing the following steps:
In WordPress, go to SEO>Tools
Click on ‘File Editor’
Under ‘robots.txt’ beneath ‘Edit the content of your robots.txt:’ is a field from which you can directly edit your robots.txt file
After making any changes to the file, click ‘Save changes to robots.txt’
We also have more information on this and editing the robots.txt file here: https://kb.yoast.com/kb/how-to-edit-robots-txt-through-yoast-seo/