Floodlights installed where theirs no junction box

I have two places around my house that I would love to be able to install floodlights but theirs no previous junction box

So I’m thinking of buying a junction box and installing mine where I want them and connecting them to a near by power source

Just wondering if anyone has done this ?!?!

I have gotten the idea from this video , I’ll leave a link below .

Any advice or thoughts ? Thanks

-Rulwiz