Hi Kenji,
To complete Peter BENSCH answer, both tools are complementary:
X-CUBE-AI is used to convert pre trained neural networks into an optimized code for STM32 microcontroller. Which means that, beforehand, you must create a neural network that solves your problem, yourself (with Pytorch or TensorFlow for example)
NanoEdge AI Studio in the other hand, generate ML solution from scratch by benchmarking various model and selecting the best Machine Learning library given your data (it is an autoML software). NanoEdge will then generate C libraries that you can implement on your embedded code for your STM32 MCU.
NanoEdge can achieve good results with small models, small datasets and has low RAM/FLASH usage. X-CUBE-AI can be used for bigger models such as CNN for computer Vision. So given your use case and your state of progress you might choose to use one solution or the other.
You can find much more information here:
Artificial intelligence ecosystem for STM32 - STMicroelectronics
Here is the link to the documentation of all AI solutions: https://wiki.st.com/stm32mcu/wiki/Category:Artificial_Intelligence