diff --git a/vendor/magento/module-customer-graph-ql/Model/GetGuestOrdersByEmail.php b/vendor/magento/module-customer-graph-ql/Model/GetGuestOrdersByEmail.php
new file mode 100644
index 0000000000000..b06ff42b7d2de
--- /dev/null
+++ b/vendor/magento/module-customer-graph-ql/Model/GetGuestOrdersByEmail.php
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Copyright 2024 Adobe
+ * All Rights Reserved.
+ *
+ * NOTICE: All information contained herein is, and remains
+ * the property of Adobe and its suppliers, if any. The intellectual
+ * and technical concepts contained herein are proprietary to Adobe
+ * and its suppliers and are protected by all applicable intellectual
+ * property laws, including trade secret and copyright laws.
+ * Dissemination of this information or reproduction of this material
+ * is strictly forbidden unless prior written permission is obtained from
+ * Adobe.
+ */
+declare(strict_types=1);
+
+namespace Magento\CustomerGraphQl\Model;
+
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Sales\Api\OrderRepositoryInterface;
+use Magento\Sales\Api\Data\OrderSearchResultInterface;
+
+class GetGuestOrdersByEmail
+{
+    /**
+     * @param OrderRepositoryInterface $orderRepository
+     * @param SearchCriteriaBuilder $searchCriteriaBuilder
+     */
+    public function __construct(
+        private readonly OrderRepositoryInterface $orderRepository,
+        private SearchCriteriaBuilder $searchCriteriaBuilder
+    ) {
+    }
+
+    /**
+     * Retrieve customer orders collection
+     *
+     * @param string $email
+     * @return OrderSearchResultInterface
+     */
+    public function execute(string $email): OrderSearchResultInterface
+    {
+        $this->searchCriteriaBuilder->addFilter(
+            'customer_email',
+            $email,
+            'eq'
+        )->addFilter(
+            'customer_is_guest',
+            1,
+            'eq'
+        );
+        return $this->orderRepository->getList($this->searchCriteriaBuilder->create());
+    }
+}
diff --git a/vendor/magento/module-customer-graph-ql/Plugin/Model/MergeGuestOrder.php b/vendor/magento/module-customer-graph-ql/Plugin/Model/MergeGuestOrder.php
new file mode 100644
index 0000000000000..b86c133a5da54
--- /dev/null
+++ b/vendor/magento/module-customer-graph-ql/Plugin/Model/MergeGuestOrder.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Copyright 2024 Adobe
+ * All Rights Reserved.
+ *
+ * NOTICE: All information contained herein is, and remains
+ * the property of Adobe and its suppliers, if any. The intellectual
+ * and technical concepts contained herein are proprietary to Adobe
+ * and its suppliers and are protected by all applicable intellectual
+ * property laws, including trade secret and copyright laws.
+ * Dissemination of this information or reproduction of this material
+ * is strictly forbidden unless prior written permission is obtained from
+ * Adobe.
+ */
+declare(strict_types=1);
+
+namespace Magento\CustomerGraphQl\Plugin\Model;
+
+use Magento\Customer\Model\AccountManagement;
+use Magento\Customer\Api\Data\CustomerInterface;
+use Magento\Sales\Model\Order\CustomerAssignment;
+use Magento\CustomerGraphQl\Model\GetGuestOrdersByEmail;
+
+class MergeGuestOrder
+{
+    /**
+     * @param GetGuestOrdersByEmail $getGuestOrdersByEmail
+     * @param CustomerAssignment $customerAssignment
+     */
+    public function __construct(
+        private readonly GetGuestOrdersByEmail $getGuestOrdersByEmail,
+        private readonly CustomerAssignment $customerAssignment
+    ) {
+    }
+
+    /**
+     * Merge guest customer order after signup
+     *
+     * @param AccountManagement $subject
+     * @param CustomerInterface $customer
+     * @return CustomerInterface
+     */
+    public function afterCreateAccount(AccountManagement $subject, CustomerInterface $customer)
+    {
+        $searchResult = $this->getGuestOrdersByEmail->execute($customer->getEmail());
+        foreach ($searchResult->getItems() as $order) {
+            $this->customerAssignment->execute($order, $customer);
+        }
+        return $customer;
+    }
+}
diff --git a/vendor/magento/module-customer-graph-ql/etc/graphql/di.xml b/vendor/magento/module-customer-graph-ql/etc/graphql/di.xml
index 305e9cd12d676..22bfedf0d00cc 100644
--- a/vendor/magento/module-customer-graph-ql/etc/graphql/di.xml
+++ b/vendor/magento/module-customer-graph-ql/etc/graphql/di.xml
@@ -209,4 +209,8 @@
             </argument>
         </arguments>
     </type>
+    <type name="Magento\Customer\Model\AccountManagement">
+        <plugin name="merge_order_after_customer_signup"
+                type="Magento\CustomerGraphQl\Plugin\Model\MergeGuestOrder" />
+    </type>
 </config>
diff --git a/vendor/magento/module-quote-graph-ql/Plugin/Model/MergeGuestOrder.php b/vendor/magento/module-quote-graph-ql/Plugin/Model/MergeGuestOrder.php
new file mode 100644
index 0000000000000..6216bce3cc31c
--- /dev/null
+++ b/vendor/magento/module-quote-graph-ql/Plugin/Model/MergeGuestOrder.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Copyright 2024 Adobe
+ * All Rights Reserved.
+ *
+ * NOTICE: All information contained herein is, and remains
+ * the property of Adobe and its suppliers, if any. The intellectual
+ * and technical concepts contained herein are proprietary to Adobe
+ * and its suppliers and are protected by all applicable intellectual
+ * property laws, including trade secret and copyright laws.
+ * Dissemination of this information or reproduction of this material
+ * is strictly forbidden unless prior written permission is obtained from
+ * Adobe.
+ */
+declare(strict_types=1);
+
+namespace Magento\QuoteGraphQl\Plugin\Model;
+
+use Magento\Quote\Model\QuoteManagement;
+use Magento\Sales\Api\OrderRepositoryInterface;
+use Magento\Store\Model\StoreManagerInterface;
+use Magento\Sales\Model\Order\CustomerAssignment;
+use Magento\Customer\Api\CustomerRepositoryInterface;
+use Magento\Framework\Exception\NoSuchEntityException;
+
+class MergeGuestOrder
+{
+    /**
+     * @param OrderRepositoryInterface $orderRepository
+     * @param StoreManagerInterface $storeManager
+     * @param CustomerAssignment $customerAssignment
+     * @param CustomerRepositoryInterface $customerRepository
+     */
+    public function __construct(
+        private readonly OrderRepositoryInterface $orderRepository,
+        private readonly StoreManagerInterface $storeManager,
+        private readonly CustomerAssignment $customerAssignment,
+        private readonly CustomerRepositoryInterface $customerRepository
+    ) {
+    }
+
+    /**
+     * Merge guest order in  customer after place order
+     *
+     * @param QuoteManagement $subject
+     * @param int $orderId
+     * @return int
+     * @throws \Magento\Framework\Exception\LocalizedException
+     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     */
+    public function afterPlaceOrder(QuoteManagement $subject, int $orderId)
+    {
+        if ($orderId) {
+            $order = $this->orderRepository->get($orderId);
+            if ($order->getCustomerIsGuest() && $order->getCustomerEmail()) {
+                try {
+                    $websiteID = $this->storeManager->getStore()->getWebsiteId();
+                    $customer = $this->customerRepository->get($order->getCustomerEmail(), $websiteID);
+                    if ($customer->getId()) {
+                        $this->customerAssignment->execute($order, $customer);
+                    }
+                    // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock
+                } catch (NoSuchEntityException $e) {
+                    // Do not remove this handle as it used to check that customer
+                    // with this email not registered in the system
+                }
+            }
+        }
+        return $orderId;
+    }
+}
diff --git a/vendor/magento/module-quote-graph-ql/etc/graphql/di.xml b/vendor/magento/module-quote-graph-ql/etc/graphql/di.xml
index 83942f1daebb2..6ded0467ecd0e 100644
--- a/vendor/magento/module-quote-graph-ql/etc/graphql/di.xml
+++ b/vendor/magento/module-quote-graph-ql/etc/graphql/di.xml
@@ -73,4 +73,8 @@
             </argument>
         </arguments>
     </type>
+    <type name="Magento\Quote\Model\QuoteManagement">
+        <plugin name="merge_guest_orders_with_customer_after_place"
+                type="Magento\QuoteGraphQl\Plugin\Model\MergeGuestOrder" />
+    </type>
 </config>
