Q.pruning raspberry canes
How can I tell which canes have produced and are to be cut out?

One good way is to mark the fruiting canes when the berries are on them; use white paint or a piece of florist wire, or anything you can think of, really.
Primocanes (the first year growth) will look cleaner and smoother, and may have new growth on them; floricanes (the second year growth) will be rougher, with remnants of fruit and flower.
It's not always easy to tell the difference, or where you should cut. But caneberries are tough customers and will fruit no matter what; as you learn the best ways to care for them, they'll fruit more and more. This article could help you put it all together: https://www.gardeningknowhow.com/edible/fruits/raspberry/pruning-raspberry-bushes.htm