According to my research and testing , unfortunately we cannot add a shape or image in SharePoint navigation bar. Here are a few things we can do:
- Change the look of your page's navigation style, colors, and logo.
- On a team site you can add, edit, or remove links on the navigation menu.
- Edit the horizontal menu, footer menu (communication site only), or the hub site navigation bar that appears on all communication sites associated with a hub site.
- Target navigational links to specific audiences with modern SharePoint in Microsoft 365 audience targeting.
- Set up a multilingual site name, navigation and footer on Communication sites.
You can refer to this article: Customize the navigation on your SharePoint site
Thanks for your understanding.
===================================
If the answer is helpful, please click "√" on the left panel of the answer and kindly upvote it.