Anybody can ask Alexa, “Am I going to get a boyfriend?” But when Dr. Ruth Westheimer, the famous sex therapist, puts the question to Amazon’s virtual assistant, in her thick German accent, it’s somehow more endearing.

That’s how filmmaker Ryan White opens his documentary “Ask Dr. Ruth,” a winning profile of the 90-year old author, therapist and media personality. Dr. Ruth, as Westheimer is more commonly known, welcomes the film crew to her Manhattan apartment by offering cookies — and asking an unseen crew member, “Did you call your mother?” With instincts so maternal, and a personality so disarming, one can’t help but listen to her talk, much more frankly, about blush-worthy body parts and bedroom activity.

The fact that such candid discussion comes from someone who reminds you of your grandmother has always been part of Dr. Ruth’s charm. That’s what led to her emergence in the 1980s, first as a radio host on WYNY, and later as a fixture on late-night TV talk shows.

For the most part, White, who made the Netflix true crime docuseries “The Keepers,” simply gets out of his subject’s way, letting her win you over with her sunny demeanor.

That optimism was hard-won.

Born Karola Ruth Siegel in 1928 Germany, Dr. Ruth last saw her parents, who were killed in the Holocaust, when she was 10 years old. Part of the Kindertransport program, an operation that rescued Jewish children from the Nazis, she grew up in a Swiss orphanage, later emigrating to Palestinian territories when she was 17 and training to be a sniper for the Israeli Army (although she never killed anyone). Severely wounded on her 20th birthday when a shell exploded near her during the Israeli War of Independence, she nearly lost her legs.

A lonely childhood seems to have inspired Dr. Ruth’s intense longing for intimacy. As “Ask Dr. Ruth” suggests, such alienation may have led to her lifelong passion for helping others to foster healthy relationships, and to walk away from harmful ones.

At a preview screening, Westheimer told the audience that she worried that the movie’s animated sequences — which depict her early life — Amake her look like Pinocchio or Mickey Mouse. Fortunately, the reenactments are rendered with sensitivity, respectfully capturing the wide-eyed curiosity of a young woman, and conveying her story in a way that archival footage and family photos cannot.

One thing is clear from old photos of Dr. Ruth, even group photos so blurry you can barely make her out: Her spirit and good cheer are evident, even as a child. Someone as charismatic as she is could have gone into any field, and presumably people would listen. But as “Ask Dr. Ruth” demonstrates, her message is an important one: however explicit the language, all she really wants is for no one to be lonely.

MOVIE REVIEW

“Ask Dr. Ruth”

Grade: B

Starring Dr. Ruth Westheimer. Directed by Ryan White.

Unrated but contains graphic sexual discussion. Check listings for theaters. 1 hour, 40 minutes.

Bottom line: A well-done look at the sex therapist and her life