In that case you should use X-Means clustering, which is built on K-Means, but automatically estimates the optimal number of clusters, see https://www.cs.cmu.edu/\~dpelleg/download/xmeans.pdf and https://docs.rapidminer.com/2024.1/studio/operators/modeling/segmentation/x_means.html#:~:text=X%2DMeans%20is%20a%20clustering,sense%20according%20to%20the%20data.