This will sound as if I'm being intentionally rude: sorry if it comes across like that as that isn't what I'm trying to do!
But what do you mean by 'railcard'? The thing is, there's a particular type of document issued by the railway that's called that (and which you can have digitally on your phone instead). These are called things like the 16-25 railcard, veterans' railcard, two together railcard and so on. As long as you have one of these, and it's in date, and you follow some other rules, you can buy cheap train tickets instead of paying the full fare.
There are also other things that the railway issues which people sometimes call railcards. These include tickets for a journey from A to B, season tickets (which allow you to go from A to B as often as you want for a week or a month or a year and so on) and things like London Travelcards which allow you to go anywhere on the Underground and buses and trains in London for a day or a week and so on. Lots of people call those railcards - but they're not, and they have different rules from 'proper' railcards.
Because the rules are different, we really need to know exactly what you had and what was on your phone that you couldn't show the inspector. So please tell us!