How to go from add_submenu_page to another page


hello everyone i’m going from procedural php to objects, i was asking myself a question, once i created my plugin that gives me the possibility to have in the wp dashboard a quick view of a section through add_menu_page, and created sub-items add_submenu_page, I am inside this page,

function secondo_menu_sottomenu(){     echo '<div class="wrap"><div id="icon-options-general" class="icon32"><br></div>         <h2>PRIMO SOTTOMENÙ</h2></div>                  <!--Card--> <div id="test" class="card card-cascade narrower mb-4" style="margin-top: 28px;cursor: pointer;">     <!--Card image-->     <div class="view view-cascade">          <a>             <div class="mask rgba-white-slight"></div>         </a>     </div>     <!--/.Card image-->     <!--Card content-->     <div class="card-body card-body-cascade">         <h5 style="font-weight: 500;font-size: 17px;">             TEST         </h5>         <small>N° TEST</small>     </div>     <!--/.Card content--> </div> <!--/.Card--> <script type="text/javascript">     document.getElementById("test").setAttribute(\'onclick\', \'location.href = "test.php"\'); </script>         '; } 

now I would like to go to a page called test.php, but how do I create it?

I mean imagine you have the dashboard page, then the users section, and inside users, I want to create a page called registered users and see all registered users, this is what I want to explain.

in procedural I would have created:

home.php user.php

and in user.php a link to alluser.php

how do I create the test.php is there an add_page-like instruction?