Of course practicing helps, just like in any sport, but there are also TECHNIQUES that make any skill easier to do correctly or to improve more quickly.
At each move or whenever the board is not completely clear, say these words:
"Fix the board in my mind: King is there/F8, my Queen is there/H7, that/G8 is empty, that/D3 is empty".
Don't let naming the squares get in the way of visualization -- both are useful, but practice naming and finding the squares separately -- especially if naming them isn't completely easy or interferes with SEEING in your mind.
It's fine to name them if you can do so fluidly, otherwise merely say "there" and "that" or "next to Pawn"
Generally avoid mentioning pieces that are gone; captured pieces are covered by EMPTY and saying where active pieces are NOW located.
Do include "EMPTY" in your list, both to see open lines and to firmly fix where pieces can now move, as well as to stop "interference" from the real/computer board with the one in your mind.
This is NOT as good as eventually being able to "just do it" but it's a technique anyone can do IMMEDIATELY, even a beginner, to improve right now and work towards better visualization through automatic methods.
With this method, you can continue to look at the actual (or computer) board and just update empty squares and pieces standing on new squares of the BOARD IN YOUR MIND.
At any stage or whenever needed, repeat the process to update the board in your mind -- just doing the process will increase your future ability to visualize, along with clarifying the current board.
A beginner may need to do this after each full move, or even after each half-move at first, while someone with a bit more skill may do it only every 2, 3, or more moves.
Just repeat it as necessary, or use it whenever vision isn't as clear as you wish it to be.