Given you work from home, I assume this is a family/household member interrupting you?
So you don't have the option of pulling rank at work, or telling a superior something like "is this conversation important enough to push back the deadline on what I'm currently working on?" (and if so, can we get that in the ticket tracker in writing? 🙄)
Hmm...
In a workplace, you could also try to insist people book a meeting time. Maybe a possible strategy, to convince your household interrupter that you're not dismissing or ignoring them, is to make it clear you're scheduling them in for later?
Like, grab a notepad and write down something based on that first sentence after "I wanted to tell you..." (something like "Alex -- grocery list" or whatever). Then interrupt with "OK, got it, I'll find you when I'm finished work & you can give the details." If they start talking again: "Is there an emergency that absolutely needs my input in the next X hours?"
But of course, you need to actually follow up later!