The option to delete a product and services in QuickBooks Online isn't available. You can only make them inactive. This way, it will be removed on your Products and Services list.
Once the product is already inactive, it will not be deleted from the invoice you've created. However, it shows as "Name of the inactive product or service (deleted)" in transactions. And, will no longer show in reports.
For additional information, you can click this article: Remove or merge a product or service. This also provides steps on how you can make a product or service inactive and reactivate it again.