Back gears are jumping I am a newbie at gears.  I had to buy a new cassette and back wheel, and have just done a straight swap.

Now I am not getting all my gears at the back. Eg when in fifth gear it says I'm in 4th etc.

What is wrong ?
When you replace a wheel the cassette is not guaranteed to be in exactly the same place relative to the frame as it was on the old wheel, so you need to re-adjust the limits and indexing of the derailleur. Park Tool has a great instruction page with videos that use can use to learn how to do this.

Also make sure that you cassette is installed properly. Some cassettes have a spacer that must be installed on the freehub before the cassette sprockets.

As Criggie said in a comment, you should replace the chain when you replace the cassette.