How to do the Flat Rate Shipping Method only for selected products.
You can do this by using some extension . For instance this extension would help you.
https://www.mconnectmedia.com/magento-flat-rate-shipping-per-product.html
https://plugin.company/blog/configuring-shipping-rates-per-product-in-magento/