Apple had been slowing down some iPhone devices (version 6 or later) as their batteries age. Apple are offering a free battery replacement for eligible devices – you can check if your phone is eligible here:

Apple is reducing the price of an out-of-warranty iPhone battery replacement from A$119 down to A$39 — for anyone with an iPhone 6 or later whose battery needs to be replaced, available worldwide through to December 2018: