A town has been awarded £20m Pride in Place funding to upgrade its high street, improve community facilities, and enhance public spaces.