How to add Category Custom Layout Update XML file in Magento 2.3.4?

From Magento 2.3.4, Custom Layout Update Textarea removed from the admin panel category edit page, product edit page and cms edit page to remove the opportunity of Remote Code Execution (RCE). Replace Textarea with a selector.

Earlier you can add directly XML code snippet for the specific entity from the backend but from Magento 2.3.4 new feature was added. You need to create an XML file in your theme or module level and assign an XML file to the Custom Layout Update selector.

1. Category Page:
Let’s create a Specific XML handle for the Category page.
You have to create a separate file for each category you want to use a custom layout update.

You can be assigned the layout update XML file from the Admin panel,
Go to Catalog -> Categories
Choose Any(Bag) Category, Click on Design Section
Choose Layout handle from the Custom Layout Update Field.

Default Layout handle is No update selected. If you have created a custom layout for the specific category, You can see a new layout handle for the category.

Default Layout Handle Syntax for category page:
catalog_category_view_selectable_CATEGORYID_CATEGORYNAME.xml

For example, You want to remove the footer section from the Bags Category of Native Magento sample data. You need to create a layout update handle for the Bags Category.
CATEGORYID indicates the Bags Category id (4)
CATEGORYNAME indicates your custom category name, we have taken the name as bags. (use a single word for the category name without space, dash or underscore)
Your actual handle will be,
catalog_category_view_selectable_4_bags.xml

Now, You have to create an XML file in theme or module level with below path,

Theme Level: app/design/frontend/<Vendorname>/<themename>/Magento_Catalog/layout/catalog_category_view_selectable_4_bags.xml
                                                                                Or
Module Level: app/code/Jesadiya/Demo/view/frontend/layout/catalog_category_view_selectable_4_bags.xml

Now Go To Admin panel Bags Category Page, Choose bags layout handle from the selector and Save Category.

custom-layout-update-xml
custom-layout-update-XML Magento 2.3.4

Clear Cache and Check the storefront with the Bags page. Footer block will be removed from the Category page.

2. Product Page:
For product pages layout syntax: catalog_product_view_selectable_PRODUCT_SKU_PRODUCTNAME.xml

For example (Push It Messenger Bag from Magento sample data):
catalog_product_view_selectable_24-WB04_PushMessagerBag.xml

Check for the CMS Page Layout Update XML.