I have an old giant 9 speed, which I want to convert to an 11 speed, simpy to use on a smart trainer
You can convert it to 11 speed, but it involves changing a bunch of parts.


Obviously, an 11-speed cassette is required. For a road bike: you should check if your freehub body has a spacer, if it does then the hub can accept any Shimano/SRAM 11 speed cassette. If there's no spacer, you can get a Shimano CS-HG800 (works with narrow freehub bodies). If freehub is Campy-spec, then any Campy 11-speed cassette will fit. Another option is to source a wider, aftermarket freehub body if such an option is available. For MTB: get any 11-speed cassette compatible with your freehub (which is most likely a regular Shimano HG).
You will need 11-speed shifter(s), compatible with your new RD. A cheaper solution might be to get a friction shifter or only a rear shifter and leave the old front shifter as is. You did not say what RD you already have, but I hope it's a not an MTB-specific one, otherwise you'd have "fun" looking for a compatible shifter option (there are some).
Any 11 speed chain.
Make sure your new RD can clear the biggest cog on the new cassette. Usually, this info can be found in product manual.
Make sure the RD can handle the chain growth capacity. I'm not sure road 11 speed system work with a triple up front, you did not specify what the current groupset is.


As you can see, there's a lot of variables involved, a list of current parts would simplify the answer a great deal.