Community spaces will get up to £300,000 funding to help protect and bring to life spaces across Wales