In order to disable the quantity and in-stock options for the virtual product, navigate catalog_product_view.xml file, and extends the block/container and then in your template check if the product is of type virtual then don't show the product stock , else show the product quantity for other products.
Your/module/view/frontend/layout/catalog_product_view.xml
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="product.info.main">
<block class="Your\Module\Block\HideStock" name="hide_stock" template="Your_Module::hideStock.phtml"></block>
</referenceContainer>
</body>
</page>
Similarly create a block for the layout. i.e. Your\Module\Block\HideStock and add the corresponding functions
In your phtml i.e. Your_Module::hideStock.phtml
if($product->getTypeId() != "virtual"){
show product stock options
}
else{
hide stock options
//your code here
}