Sophie, now in her old form, enters the castle and meets Howl and his assistants, Markl and the Witch of the Waste (who had cast the spell on her). As Sophie navigates the castle and gets to know its inhabitants, she learns about Howl's troubled past and his reluctance to become involved in the affairs of the kingdom.

You're referring to "Howl's Moving Castle"!

As an old woman, Sophie leaves her home and sets out on a journey. She encounters a magical moving castle belonging to the wizard Howl, a mysterious and reclusive magician who is known for his exceptional beauty and magical abilities. The castle is controlled by a fire demon named Calcifer, who powers the castle's movements.

"Howl's Moving Castle" was a critical and commercial success, winning several awards, including the Japanese Academy Prize for Best Film. The movie has since become a beloved classic, widely regarded as one of the greatest animated films of all time.