magento2 – Magento 2.4 add multiple Custom Links to Main Navigation via Plugin

You can use like this below way :

<?php

/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

namespace VendorModulePlugin;

use MagentoFrameworkDataTreeNodeFactory;
use MagentoFrameworkUrlInterface;

class Topmenu {
    /**
     * @var NodeFactory
     */
    protected $nodeFactory;

    /**
     * @var UrlInterface
     */
    protected $urlBuilder;

    /**
     * @param NodeFactory  $nodeFactory
     * @param UrlInterface $urlBuilder
     */
    public function __construct(
        NodeFactory $nodeFactory,
        UrlInterface $urlBuilder
    ) {
        $this->nodeFactory = $nodeFactory;
        $this->urlBuilder = $urlBuilder;
    }

    public function beforeGetHtml(
        MagentoThemeBlockHtmlTopmenu $subject,
        $outermostClass = '',
        $childrenWrapClass = '',
        $limit = 0
    ) {
        /**
         * Parent Menu
         */
        $menuNode = $this->nodeFactory->create(
            (
                'data' => $this->getNodeAsArray("Main Menu", "main-menu"),
                'idField' => 'id',
                'tree' => $subject->getMenu()->getTree(),
            )
        );
        /**
         * Add Child Menu
         */
        $menuNode->addChild(
            $this->nodeFactory->create(
                (
                    'data' => $this->getNodeAsArray("Sub Menu", "sub-menu"),
                    'idField' => 'id',
                    'tree' => $subject->getMenu()->getTree(),
                )
            )
        );
        $subject->getMenu()->addChild($menuNode);
    }

    protected function getNodeAsArray($name, $id) {
        $url = $this->urlBuilder->getUrl($id);
        return (
            'name' => __($name),
            'id' => $id,
            'url' => $url,
            'has_active' => false,
            'is_active' => false,
        );
    }
}

I added Parent Menu & Child Menu. You can use it multiple times which you want to add multiple links.

Reference