The Internet of Things (IoT) universe will continue to expand with the advent of the sixth generation of mobile networks (6G), which is expected to support applications and services with higher data rates, ultra-reliability, and lower latency compared to the fifth generation of mobile networks (5G). These new demanding 6G applications will introduce heavy load and strict performance requirements on the network. Network Function Virtualization (NFV) is a promising approach to handling these challenging requirements, but it also poses significant Resource Allocation (RA) challenges. Especially since 6G network services will be highly complicated and comparatively short-lived, network operators will be compelled to deploy these services in a flexible, on-demand, and agile manner. To address the aforementioned issues, microservice approaches are being investigated, in which the services are decomposed and loosely coupled, resulting in increased deployment flexibility and modularity. This study investigates a new RA approach for microservices-based NFV for efficient deployment and decomposition of Virtual Network Function (VNF) onto substrate networks. The decomposition of VNFs involves additional overheads, which have a detrimental impact on network resources; hence, finding the right balance of when and how much decomposition to allow is critical. Thus, we develop a criterion for determining the potential/candidate VNFs for decomposition and also the granularity of such decomposition. The joint problem of decomposition and efficient embedding of microservices is challenging to model and solve using exact mathematical models. Therefore, we implemented a Reinforcement Learning (RL) model using Double Deep Q-Learning, which revealed an almost 50% more normalized Service Acceptance Rate (SAR) for the microservice approach over the monolithic deployment of VNFs.