calculate the time span

can you help me solve this case.

case : 

Alice bought item A on January 1 2023, then Alice bought item A on January 10 2023.

Calculating the time span of repeat purchases 

my current data

I want data like this

If your data source supports window functions, you should be able to calculate it.