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:

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,

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
Module Level: app/code/Jesadiya/Demo/view/frontend/layout/catalog_category_view_selectable_4_bags.xml

<?xml version="1.0"?>
 * Custom layout update handle demo magento 2.3.4+.
<page xmlns:xsi="" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceBlock name="footer" remove="true" />

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

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):

Check for the CMS Page Layout Update XML.