Depends on how much/far you ride. A smartphone can more or less do much of what a dedicated bike computer can do to varying degrees of success but the battery life is better, doesn't deplete your cell, and the computer will probably be more accurate when it comes to stuff like bike speed, trip tracking, etc.
Currently I just use my phone but there's plenty of times Google thinks I'm driving a car when I'm actually riding my bicycle, ebike, or even a board sometimes.