OK, lets look at this logically.
If the chain won't shift to the big ring, either
a) The mech is incapable of doing it for some reason
or
b) The chainrings are too far out and the mech can't reach them.
So, a) first:
The mech may be worn and sloppy or damaged:
Is it a low clamp design? They go sloppy really fast. Is the screw or rivit that holds the mech cage still in place? If not you have a bendy open ended mech! Is the cage bent? I've had this happen mid-ride and it wasn't the bit that touches the chain, but the bit just above it (Same piece of metal) that had been bent inwards, moving the whole cage inwards. Hard to spot, but a big effect! Is the inner plate of the mech still straight and in good shape?
The mech may not be set up properly:
Is the outer cage about 2-3mm above the chainring when shifed to the outer position? Is the cage parallel to the chainrings? Are the limit screws properly adjusted?
And the biggie, the one a lot of people do and don't realise:
Is the cable routed properly round the mech cams and screwed under the correct side of the bolt? If not, the cable isn't moving the mech far enough for a given amount of cable pull. I've done it, I've seen it done. If you don't know about it, you might never spot it.
Now for b)
Are the chainset/rings in the correct place? I recently fitted a new (Sq taper) chainset to a budget commuter bike. It turned out it was designed for a different chainline and needed a shorter BB fitting to put the rings in the same place as the old cassette.
If it's SQ taper, are the crankbolts nice and tight? This moves the chinset inwards if they are loose.
If it's HT2, have you checked the BB shell width and fitted the correct amount of spacers for your bike? – 73mm shell = 1 spacer on driveside, 68mm shell = 2 on driveside, 1 on the other side. It's easy to fit a new BB and get the spacers in the wrong places, and move the chainset out a few mm. I've done this, and the effect is exactly as you describe.
Are your chainring bolts loose? Again, I've had this happen on an XT chainset. The rings move around, it becomes harder and harder to get to the big ring…..
Give all that a go. I'll bet it's something I've mentioned there.
(Unless you've got some silly components that don't work together, that is!)
🙂