Slicing the 5G core network involves specifying network services according to the functional and quality requirements of typical 5G use cases. In doing so, assessing the scalability and performance of network services plays a leading role, since it allows dimensioning their capacity. Since years ago, diverse approaches have proposed formal models to analyze network services' scalability, but they have not focused on the 5G core. Also, recent approaches have focused on analyzing network services' performance in the 5G core, but they have not investigated the scalability issue. In this paper, we propose a method, based on the Performance Evaluation Process Algebra (PEPA), aiming at enabling the systematic analysis of the performance and scalability of network services in the 5G core. We introduce new composite structures based on PEPA and intended to model and evaluate 5G network core procedures. We illustrate how to use our method by presenting the modeling and assessment of two services regarding scalability and performance metrics. The former corresponds to the session establishment in a 5G network slice. The latter corresponds to the user registration process in a network slice for Vehicle-to-Everything. Results show the usefulness of our method to model 5G core network services and dimension the capacity of slices that implement them. Furthermore, the validation results corroborate, in terms of accuracy, that our PEPA-based method measures performance metrics (throughput, average response time, and processor utilization) with negligible difference regarding a traditional approach like the Layered Queuing Network model.