in Magento 2.3.0 I have followed the above solution but still not loading my css, I have search ran all the commands but still nothing. Please any mistake on my implentation below, I am trying to add custom.css to the luma theme.
app/design/frontend/Magento/Luma/Magento_Theme/layout/default_head_blocks.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<css src="css/custom.css"/>
</head>
</page>
app/design/frontend/Magento/Luma/web/css/custom.css
or
app/design/frontend/Magento/Luma/Magento_Theme/web/css/custom.css