Here is what you should do you shouldn't panic or assume your talent is gone; instead, you should treat this like a rebuilding phase and lower the pressure you are putting on yourself. Rather than forcing full scenes, you should practice small, low-stakes exercises writing a few sensory details about your surroundings each day, jotting down how one character gestures or speaks in bullet points, or drafting short fragments of dialogue without worrying about quality. Also you should intentionally allow herself to write badly to remove perfectionism from the equation and focus on reconnecting with the act of creating instead of producing something impressive. At the same time, you should check in on your mental and emotional well-being sleep, stress, and mood because difficulty imagining and holding details can sometimes stem from fatigue or anxiety rather than lost skill.
Most importantly, you should be patient and consistent, trusting that your storytelling instincts are still there and that steady, gentle practice will help you regain clarity and confidence over time. Also one final thing is you didn't lose your writing ability, you wrote this post beautifully you're still observant, emotionally articulate, structured, and precise about what matters in your craft. That is not someone who's gone empty that is someone in a temporary fog and fog passes and the fact that you care this much? Shows that is the strongest sign you're still a writer.