Technically speaking a window is an independant object comprised of several parts, and it is inserted into an opening in a wall, it is not part of the wall. Of course it depends on your end-goal, but if you want a more architecturally sound solution, here goes.
To that effect you can use the built-in Archimesh add-on. Enable it in the preferences then go to Add > Mesh > Archimesh > Panel Window. Select the new window, go to the N panel Create subpanel, and tweak the parameters. Here's an example.
The window comes with a handy hole object you can use to poke a hole in your wall.