The rule is that you must buy a ticket before boarding where there are the facilities to do so. If you start your journey at Garsdale, there are no ticketing facilities - so there is no expectation that you buy a ticket before boarding. The Settle line is also one of the few Northern routes on which Penalty Fares don't apply.
You might find it cheaper to buy an Advance ticket through an app or online, even just a couple of minutes before you board. But that does depend on the exact journey you're making, since Advance tickets aren't available for all journeys - e.g. they're available from Garsdale to Leeds, but not Garsdale to Hellifield or Skipton. There's also poor mobile signal on most networks in that part of the world, so you may struggle to search for (let alone buy) tickets if you're waiting on the platform.
It's worth noting that if you have boarded the train without a ticket (which is entirely legitimate at Garsdale), you shouldn't then try to buy a ticket through your phone and present that ticket to the guard. You should just buy your ticket from the guard; if you buy a ticket online after boarding, the guard's device will flag this up when they scan your ticket and they might ask why you did that.