If you are using the customtkinter library, you can also do this:
import customtkinter as ctk
button = ctk.CTkButton(text="Centered Button")
button.place(relx=0.5, rely=0.5, anchor=ctk.CENTER)
but it should work just fine with the anchor="center". This is just another method :)