
Hi @vrindara Chopra,
The modern SharePoint online navigation works based on the mega menu and hub site.
We need to properly set up the hub site and mega menu - then using the SPFx framework coding, we can customize the look and feel of the mega menu.
You may refer to the below articles, how does megamenu work in SharePoint online?
Organize your SharePoint sites with megamenu navigation and new “change the look” options
How to develop megamenu using the SPFx framework?
Mega Menu using SharePoint Framework (SPFx) Extensions
***If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards
Cheng Feng