If you buy a new wheel, it should be ready to go, but there is some variability in quality as mentioned above.
You can also buy a replacement rim. If it matches the old rim, then you should be able to reuse all the old spokes if they are good quality.
In that case the wheel will need to be built and trued. It is something you can learn to do, even truing on your bike.