There are several resources available to help you learn how to perform k-means clustering in Stata. Here are a few suggestions:
The Stata website has a tutorial on k-means clustering, which includes an example and explanations of the commands used. You can find it here: https://www.stata.com/manuals/sgmga-cluster-kmeans.pdf
The YouTube channel "StataCorp LLC" has a video tutorial on k-means clustering in Stata: https://www.youtube.com/watch?v=q3ZOQ2aEt7w
"A Practical Introduction to Clustering in Stata" by J. Scott Long is a book that provides a comprehensive introduction to clustering in Stata, including k-means clustering. You can find it here: https://www.stata-press.com/books/pics.pdf
"An Introduction to Categorical Data Analysis" by Alan Agresti also covers k-means clustering using Stata in one of the chapters. You can find it here: https://www.wiley.com/en-us/An+Introduction+to+Categorical+Data+Analysis%2C+3rd+Edition-p-9780470646036
These resources should provide you with a good starting point for learning how to perform k-means clustering in Stata.