Retail sales rose 2.1% in February, recovering some ground from a steep fall in January.
The Office for National Statistics (ONS) said sales were still down by 3.7% on a year earlier, before the impact of the coronavirus pandemic.
Food and mixed department stores benefitted from essential retailers remaining open, it said, though clothing shops continued to struggle.
Outdoor furniture and DIY sales were strong with people stuck at home.
Jonathan Athow, ONS deputy national statistician for economic statistics, said anecdotal evidence from retailers suggested people had been spending on home improvements and on outdoor furniture, as people prepared for lockdown easing, which will allow gatherings in gardens again in England and Northern Ireland next week.
Scotland and Wales already have already eased rules about outdoor mixing.
Mr Athow said that in February, despite national restrictions, "retail sales partially recovered from the hit they took in January" when they fell by 8.2%.
He said mixed stores, including retailers such as B&M Bargains and Wilko, which were allowed to stay open as they sold some foodstuffs, had benefitted, with budget-end department stores also increasing sales.
Online sales continued to grow and hit a record 36.1% of all UK sales.
Clothing retailers have been hit the worst over the past year, the ONS said, seeing a 50.4% drop in sales volumes when compared with February 2020, before the first Covid lockdown measures were introduced.
Fuel sales have also fallen sharply, down 26.5% from a year earlier as travel restrictions continue to curb demand.
Susannah Streeter, analyst at stockbrokers Hargreaves Lansdown, said the sales figures showed people had been making some significant changes to their homes.
"With working from home at least for part of the week, likely to be the new normal going forward, many employees have been trying to create a more permanent alternative to the kitchen table or corner of the bedroom.
"Dividing open plan rooms and building garden offices are among the building projects being undertaken, as workers settle in at home for the long haul."