I can only have 2 levels in navigation.
So is there a way to extend this and have 3 levels of sub-links inside site navigation links?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
In Modern Site navigation, you can add navigation up to three levels.
It supported in both type of site i.e. Communication site and Teams Site
If you meant that you want still another sub link then it's not possible in SharePoint navigation and even in the SharePoint Hub menu.
If you still want to achieve more sub level menu then you can create SPFX Application Customizer and you can build your own logic to render navigation on top.
Reference link for SPFX Extension Samples https://github.com/pnp/sp-dev-fx-extensions/tree/main/samples
Below is the similar SPFX extension according to your requirement which is using MMD Termset to generate navigation up to more level
In SharePoint online modern experience, you can have up to 3 levels of navigation links (2 levels of sub-links):
Example (Edit mode):
Output in communication site:
You can either drag & drop links to make it as a child link OR you can select ellipses (
...) against navigation link and select Make sub link.