As @bitflip says, it’s important to change your allocations as you age. If you’re in one of Vanguard’s ‘target retirement’ funds, this will be done for you but you need to revisit it otherwise.
I’d suggest going to cash would likely be a bad idea with inflation as it is. When I approach retirement, I intend to add more bonds, equity income exposure and wealth preservation trusts such as CGT.