Yes, You can restrict customers from purchasing certain products by using the “Purchase Forms” lock feature.
This feature lets you specify which products are locked and cannot be added to a customer’s shopping cart.
You can configure this within your application’s dashboard settings.