I’m guessing you are referring to this blog post when asking about preventIndexing? I think that was just an example of how to use strapi to manage the seo metadata that appears on your frontend.
These metatags should be implemented using your frontend framework. I recommend you look for documentation from the frontend framework on google indexing. For example, if you are using next.js, check out this resource.