Thanks for the clarifications.
In this case, the problem does not seem to be with Windows. I'm suspecting the Nvidia driver.
Audio transmitted over DisplayPort is managed by the Nvidia driver.
I suggest performing a clean install of the Nvidia driver as instructed below.
Download the latest driver for your graphics card from the Nvidia website. Then, use the free DDU tool to remove the current driver. Then, install the latest driver using the installer you downloaded.
(I suggest disconnecting from the internet during the entire procedure.)
DDU: https://www.guru3d.com/files-details/display-dr...
Nvidia driver download: https://www.nvidia.com/Download/index.aspx
Run the downloaded file and follow the on-screen instructions to install the driver.
Then, see if the audio will work with the speaker connected to the monitor's audio output.
If the problem persists, let me know. Click on the "Reply" button below my reply.
If you need a tutorial for using DDU, I recommend the video below.
https://www.youtube.com/watch?v=bP-2B14Nckw
Feel free to ask back any questions.
________________________________________________________
Standard Disclaimer: There are links to non-Microsoft websites. The pages appear to be providing accurate, safe information. Watch out for ads on the sites that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the sites before you decide to download and install it.