Hey @tejashapani-1,
thanks for reaching out!
These pages should be disabled by default as long as you run WP 6.4 or above: https://make.projectdmc.org/core/2023/10/16/changes-to-attachment-pages/
You can also use an SEO plugin (like Yoast SEO) to disable them.
There is really no reason anymore to have these attachment pages activated in WordPress.
You can also exclude them in Simply Static -> Settings -> General -> Exclude by adding “attachment” to the list.