This is Bleach https://en.m.wikipedia.org/wiki/Bleach_(TV_series)
There are a gazillion Bleach movies (including a pretty good live action one), but I suspect you are thinking of the TV show, which, as with anime, you may have seen in some form of compiled version.
There isn’t much in terms of a single online source to reference. (You have to have simply seen the show.)
The series protagonist is Ichigo (which he says means “Number One!” — a homophone pun on the Japanese word for “strawberry” — a reference to his unusually natural strawberry blond hair). Ichigo is unique in that he can see and interact with ghosts.
The deuteragonist is Rukia — a Soul Reaper (Shingami in Japanese) who help spirits to move on and hunts down demons (corrupted spirits, or “Hollows”) and purifies them to move on to the afterlife.
https://bleach.fandom.com/wiki/Episodes
Ichigo Kurosaki is a 15 year old teenager with an unwanted talent for seeing spirits. This talent allows him to spot the Shinigami Rukia Kuchiki, whom he inadvertently interferes with during her duties. When Rukia is injured by a Hollow that attacks Ichigo's home, Ichigo is forced to temporarily take her Shinigami powers to defeat the Hollow. The next day, Rukia shows up at Ichigo's school as a normal human. She tells him that she has lost all of her powers, rather than merely the fraction she intended to give him, and cannot carry out her duties. Ichigo must take her place as Karakura Town's Shinigami while she recovers, guiding souls to the afterlife and defending people from attacking Hollows.
Rukia gets an artificial body and decides to stay in Ichigo’s closet, which both surprises and annoys him, especially as she has taken some of Ichigo’s sister’s clothing to use. See Episode 2: https://bleach.fandom.com/wiki/The_Shinigami's_Work
It isn’t until Episode 5: https://bleach.fandom.com/wiki/June_17,_Memories_in_the_Rain that we learn of Ichigo’s past (hinting at why he has such spiritual powers and was therefore targeted by the Hollows to begin with).
Bringing up how Ichigo said that he has been able to see spiritual beings for as long as he can remember, Rukia asks him if his mother was killed by a Hollow. With Ichigo widening his eyes in surprise, Rukia points out that Ichigo's spiritual capabilities at such a young age may have led to a Hollow killing his mother by mistake while coming after him
In the past, as he and Masaki [Ichigo’s mother] walk along the path on a riverbank, Ichigo stops upon noticing a young girl [the Grand Fisher Hollow] standing at the river's edge and wonders what she is doing. As present-day Ichigo recalls how he still could not tell the difference between the living and the dead at this time, past Ichigo lets go of his umbrella, tells his mother to wait there, and runs down the riverbank toward the girl as Masaki frantically tells him to stop.
As the girl seemingly falls into the river, Ichigo reaches out to grab her, only for her cape to disappear in his hand as a train roars by. In the present, Ichigo recounts how he was told that his name meant "to completely protect one thing you set your mind on", which made him decide to protect his mother, as past Ichigo wakes up to find himself underneath his mother's dead body. While a crying Ichigo tries to make his mother wake up, present-day Ichigo notes that his mother clearly died saving him from something even if he did not know what it was and states that he, his four-year-old sisters, and his dad loved Masaki as the center of their family.
All of Episode 6: https://bleach.fandom.com/wiki/Unbeatable_Enemy is Ichigo’s battle with the Hollow. The Grand Fisher is a Hollow that preys on women and uses a “lure” to trick people. It attacks Ichigo’s sister and friend, and taunts him with the child-lure it used on Ichigo before.
Laughing, Grand Fisher stands with the girl from the day Masaki Kurosaki died standing in front of him, to Ichigo's shock.
While the girl laughs, Ichigo asserts that she is the girl from the riverbank six years ago and demands to know what she is doing here, prompting a surprised Rukia to take note of Ichigo mentioning six years ago. Ichigo confirms that the girl was the one he tried to help as a child and grits his teeth as he recalls how she was gone and his mother was dead when he woke up. Admitting that she does not remember things from six years ago, the girl states that this is interesting and chuckles as her head splits open, revealing a bone-like carapace underneath that shoots out a tentacle before shedding the rest of the girl's body and attaching itself to Grand Fisher, who laughs.
As Ichigo looks on in shock, Rukia identifies Grand Fisher and describes how he hides himself and gives his Lure a Human appearance, which he uses to attract individuals with high [spiritual power] that he attacks and increases his own power by devouring. Noting that Grand Fisher has defeated the Shinigami for over fifty years in this manner, Rukia reveals that his favorite target is women, leading Ichigo to realize that his mother was Grand Fisher's target all along. Grand Fisher chuckles at Ichigo having survived seeing him before and theorizes that he may have initially target Ichigo for his high [spiritual power] before declaring that women always taste more delicious.
The creature screws with Ichigo’s mind while they fight to a standstill, the Hollow fleeing and Ichigo feeling unhappy that he did not manage to destroy it and avenge his mother’s death.
The live action film covers all this very well, and is worth a watch.