First, download and install the official Remote Play app for Windows or Mac. Open the Remote Play app, sign in using your PSN ID, and complete the guided setup process.
Once finished, quit the app. Open Settings on your PS5, then select System, Remote Play, and turn on Enable Remote Play before opening the Remote Play app and signing in.
Select your PS5 in the app, open Discord, and join a channel with Voice enabled. Then, click the Share Your Screen button and select the Remote Play app.