In my opinion that's not the recommended way of doing it.
I reckon instead of creating the following file:
app/design/frontend/VENDORNAME/THEME/Magento_Theme/layout/default.xml
You should create the layout file that matches the page you need to change so in your case I assume it's the product page:
app/design/frontend/VENDORNAME/THEME/Magento_Catalog/layout/catalog_product_view.xml
Putting everything in one single file in Magento 2 is not best practice in my opinion because it hides the dependencies of your code
By browsing your theme with your first file, I can't know exactly what module layout you're changing so if I'm wondering how the product.attributes
got removed and I only see a Magento_Theme
folder I will probably start looking somewhere else.
However, if I see a Magento_Catalog
folder I'll probably think "oh that could be it".