Samsung Galaxy Tab S9 Ultra as a second screen?

Been looking at videos on how to use the tablet as a second screen and the way that I could see it does not work.

I tried activating the Second Screen feature and then casting (I think that's what the Win K key do) while they are in the same wifi connection and it does not work?

Am I doing something wrong here?