Both 7nm and 5nm are important milestones in chip manufacturing technology. 7nm is the current mainstream chip manufacturing process, but 5nm is more advanced, with higher performance and lower power consumption.
In other words, 5 nanometers can make the chip more powerful, while also extending battery life. So if you need a device with higher performance, then 5nm is clearly better. However, 5nm chips are more expensive to manufacture and therefore more expensive. Therefore, if your budget is limited, 7nm technology is also a very good option.