Hi Nafin,
Your component code is fine, but it won't show up in your navigation automatically. To fix this, open the NavMenu.razor file (usually found in Components/Layout/) and add a new navigation entry for your page. For example, add a list item with a NavLink pointing to "/MyPage" (make sure the route matches the @page directive in your component). Save, rebuild, and refresh your browser to see the new link. Should look similar to this:
<div class="nav-item px-3">
<NavLink class="nav-link" href="MyPage">
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> MyPage
</NavLink>
</div>