Machine learning is becoming an increasingly critical tool in next-generation telecommunications ecosystems. Effective anomaly detection tools are more necessary than ever as mobile solutions continue to become more complex, with an array of features designed to enhance network capabilities. This article presents a novel approach to detect anomalies and forecast traffic for 5G core networks, aiming to prevent severe outages and reduce traffic impact, especially for mission-critical services. By collecting 5G network functions (NFs) metrics, we developed an unsupervised learning model utilizing Autoencoder architecture with bidirectional LSTMs. Our experiments demonstrate the effectiveness of this technique on a 5G network, showing promising potential for future applications.