I used to be able to write spontaneously. What I mean to say is that I would get this feelings in my stomach, usually during bouts of anxiety and I'd put pen to paper and rarely be disappointed with the outcomes. This hasn't happened to me in a long time. And even when I do try to write according to a previously planned plot or story line it either never goes anywhere or just isn't good. What's your advice?
There is no such condition as writer's block.
However there are several reasons you may be unable to write.
You may not have anything of consequence to say. Since the young tend to imagine that everything that pops into their heads is of consequence and needs to be expressed, and discover, as they mature, that what seemed like brilliant insight at 15 is revealed as trite banality at 25, a lot of people stop writing at this point. This is a sign of maturity, but it can suck at the time. Of course, further life experience may give you something of consequence to say, in which case you will have something to write about later.
You may have already said everything of consequence that you have to say. Wishing to follow up a successful book does not mean you actually have another book in you. Acknowledging that you don't have anything more to say is likewise a sign of maturity, but also painful. Again, further life experience may give you something of consequence to say, in which case you will have something to write about later.
You may have thought you had something to say only to get half way through it and discover that it was a chimera. The insight you thought you had has vanished or never was. Life experience etc...
There are various physical or psychological conditions that make particular kinds of work difficult or impossible. A writer could suffer from depression, for instance. You should seek appropriate treatment for these conditions, not try to beat them with writing exercises.
Writing is emotionally tiring work (and therefore physically tiring as well). Other commitments or events in your life may leave you without the emotional or physical energy to write. You can either drop some of these commitments so you can write, postpone writing until your commitments ease, or try to see if reordering your day (such as by writing from 4am to 6am before your family wakes up) allows you to apportion your energy in a way that lets you write and fulfill your other commitments.
Writing is a complex and demanding craft that takes a lot of work, patience, and study to master. With no knowledge of craft a writer may easily stream out words, but not good words. As awareness of craft begins to dawn, that easy flow of words dries up. Writing becomes much harder because first steps in the serious and conscious practice of a craft are painful and slow. For example, anyone can strum a guitar and make noise. But once you try to form chords, keep time, and follow strum patterns, things get very slow and painful for a while. Study, patience, and practice, preferable with professional feedback, are the only cure for this.
But be prepared to accept that you may simply not have anything to say. Most people don't. Personally, I think that if the core of your anxiety is "I want to write and I can't", then the probable explanation is that you have nothing to say. If the core of your anxiety is "I have this character in my head whose experience demands to be told," then you do have something to say but are having problems saying it. Your problem is not lack of something to say but lack of the craft to say it. In this case, study the craft.
The cause of your problem is difficult to diagnose on the information given, so I'll explore a few possibilities. You'll need to experiment to see what helps you.
Do you have access to what you wrote when you were rarely disappointed with your work? If you re-read it now, you might find you've developed higher standards for your work that your old work no longer meets. If so, the problem may be that you're judging your work while you write it, rather than letting a first draft form and then improving it into a second and seeing how good that is.
Another problem may be that writing "according to a previously planned plot or story line" isn't the right approach for you. That may sound ridiculous, but I can think of two reasons it might be true. One is the architect-gardener distinction (see also this answer). The other is that you might have more luck if you plan your characters instead of your plot. This can lead you to forming a plot that feels natural by exploring what your characters would do in their situation.