I finally connected with the TV (I turned off the windows firewall) but the sound coming from the TV made a crackling sound. The VLC media version is 3.0.17, I have windows 11.
When I use the VLC media player on android it worked successfully with no issues at all but is windows operating system is the problem.