ARTICLE AD BOX
tk.Tk() creates first window, and tk.Toplevel() creates second window.
You need only tk.Tk() to create Account window (main window in program).
For Main window you may need only tk.Toplevel() without mainloop() - if it has to be subwindow (and still display Account window).
If you want to replace Account window then Main will need only tk.Tk() with mainloop().
After running code I see also problem with
account.destroy() account.iconify() account.deiconify()if you destroyed window account then you can't run iconify and deiconify because window doesn't exist - and this raise error.
Full working code with some comments in code.
Because I didn't have any image so I skiped part with PhotoImage
import tkinter as tk def Main(): main = tk.Tk() main.title("Hello Budgeting software!") entry = tk.Entry(main, font=("Comic Sans", 30), fg="#00ff00", bg="#000000") entry.pack(side="left") main.mainloop() def Account(): global user global password account = tk.Tk() # it creates main window (if you assign another window to `account` then this window will be empty) def clear(event): if event.num == 1: # left mouse button user.delete(0, tk.END) else: user.delete(0, tk.END) def spark(event): if event.num == 1: # left mouse button password.delete(0, tk.END) password.config(show="*") else: password.delete(0, tk.END) password.config(show="*") def submit(): account.destroy() # account.iconify() # account.deiconify() Main() # account = tk.Toplevel() # it creates another window (subwindow) account.geometry("650x650") account.title("Hello Bank Account!") label = tk.Label( account, text=("Hello Bank Account!"), font=("Arial", 18), relief="raised", bd=10, padx=20, pady=20, ) label.place(x=190, y=10) user = tk.Entry(account, font=("Arial", 18), relief="raised", bd=5) user.insert(0, "Enter User") user.bind("<Button-1>", clear) user.place(x=190, y=150) password = tk.Entry(account, font=("Arial", 18), relief="raised", bd=5) password.insert(0, "Enter Password") password.bind("<Button-1>", spark) password.place(x=190, y=200) # icon = tk.PhotoImage(file="arrow.png") # account.iconphoto(True, icon) submit_button = tk.Button(account, text="OK", command=submit) # image=icon, submit_button.pack(side="right") account.mainloop() Account()