Ok, for backpacking the suggestion is going to really depend on how long you are planning on backpacking for.
Doing a battery only will be ideal for short trips (2 or 3 days of hiking) You can easily get a few days worth of charge out of even modestly sized batteries so long as you don't plan on doing a bunch of gaming on your phone. Just make sure you keep your phone turned all the way off while you aren't using it.
If you plan on being out longer, that's when adding a solar option makes sense. You'll want to keep the panel out and plugged into your battery while hiking and then charge your phone at night (A battery will likely have a bigger capacity than your phone, so prioritize charging that first before charging your phone.)
However, you should be aware that solar panels are somewhat bulky for the power they deliver. Most hiking solar panels will top out at a 20W rating. You can effectively cut that in half (or more depending on the where the sun is in relation to where you are walking). If you plan on setting up camp around dusk then you'll probably not be able to ideally aim the panels.
The math is pretty simple. Wattage * time = Wh. So, consider a 20W panel getting on average 5W while hiking. That translates into ~40Wh worth of charge for a days worth of hiking (assuming around 8 hours of good sunlight).
This is probably an overestimation, but lets say that a smartphone uses 10W of power. That means that after a days worth of hiking with the solar panel out on your backpack, you'd end up with about 4 hours worth of screen time bought. Not to shabby.
Now consider some of the smaller solar panels like this
Notice the dirty trick they play. They measure everything in watts but measure the solar output in MA... hmmm.. (BTW, I hate that batteries aren't universally measured in wH... so deceptive). You can probably work this backwards a little but this is mostly just a guesstimate on my part. 10k mAh / 300 mAh = 33 hours to charge. (yikes!) That's in optimal sunlight conditions! As you can see, the solar on this thing is mostly a gimmick. It's likely around a 1W panel, hardly enough to extend your hike while keeping your phone powered.
Something like this is going to be more of what you want for an extended hike (and notice how big this thing is on the hiker)
Buy Solar Panel, Anker 21W 2-Port USB Portable Solar Charger with Foldable Panel, PowerPort Solar for iPhone 11/Xs/XS Max/XR/X/8/7, iPad Pro/Air/Mini, Galaxy S9/S8/S7/S6, and More: Solar Chargers - Amazon.com ✓ FREE DELIVERY possible on eligible purchases
www.amazon.com
Anything smaller and you simply won't be getting enough juice to replace lost power from charging your phone.
For a long trip, I'd suggest the giant panel like this and a moderately sized battery (5->10Ah). For a short trip, just get a larger battery (20->50Ah), You can easily save on the weight and awkwardness.