Magento2: How to add css and js file in module

app/code/Custom/Helloword/view/frontend/web/css (contain css file )
app/code/Custom/Helloword/view/frontend/web/js (contain js file )

Open the layout file inĀ app/code/Custom/Helloword/view/frontend/layout and add the following code.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<!-- for add css and js file on page -->
<head>
       <!-- for css file -->
       <css src="Custom_Helloword::css/mycss.css"/>

       <!-- for js file -->
       <script src="Custom_Helloword::js/myjs.js"/>
      
</head>
</page>