To add to the other two answers, you don't need to stick with an Ultegra cassette.
The differences between a 10-speed Ultegra cassette and a 10-speed 105 cassette? Different color, and the Ultegra uses an aluminum lockring so it's an entire gram lighter than the same-size 105 cassette with its steel lockring.
CS-4600 Tiagra cassettes also work - I've raced on those, and I never noticed any shifting difference between Tiagra, 105, or Ultegra cassettes.
They all work.
And they all get rapidly covered with grease and gunk and dirt and no one but you will know what it is anyway.
The Tiagra cassettes also have the advantage of being one-piece, if I remember correctly. The one-piece makes it easier to install, remove, and store without losing cogs. It's also an advantage if you have an aluminum freehub - individual cogs on a cassette will dig into an aluminum freehub's splines, whereas the one-piece cassette will spread the pedaling load over a wider area and not dig into the freehub as badly, if at all.
The same goes for chains, since you're replacing your cassette you will also have to replace your chain.
Bog-standard KMC 10-speed chains work just as well as Ultegra chain.
Heck, in my experience, KMC chains work much better. The only chains I've ever had fail on me were all Ultegra chains from the same batch a bit over 10 years ago - they literally had a sideplate fail under load, separate from its pin, and have the chain fall apart - while pedaling. See https://www.google.com/search?q=ultegra+chain+CN-6701+failures - notice all the 2010/2011 dates? What if your new-old-stock 10-speed Ultegra chain is from that batch?