Here is an affordable solution: https://www.electricalengineering.xyz/videos/lt-usb-to-spdif-converter/
If you want something more better here it is as auxinput already mentioned.
https://apos.audio/collections/brand-spotlight-matrix/products/matrix-x-spdif-2-usb-interface
If you want something more better here it is as auxinput already mentioned.
https://apos.audio/collections/brand-spotlight-matrix/products/matrix-x-spdif-2-usb-interface