The windows in the Boeing 787 Dreamliner are awesome. You can electronically dim them for five different levels of sunlight and visibility. That's so much better than the typical aeroplane window shade option of blinding or blocked out. But the coolest thing about Dreamliner windows are how huge they are, like vertical panoramas of the sky. How come the 787 can support bigger aeroplane windows but other planes can't? It's because the Dreamliner is mostly made of carbon reinforced plastic.
Real Engineering explains that the composite material that makes up most of the Dreamliner can take more stress than the traditional aluminium used in aircraft fuselages. And that's important because windows block the flow of stress in the structure and too much stress would lead to cracks. Cracks, as you can imagine, are not good on aeroplanes.
So aeroplane windows are oval because the stress flows much nicer around the oval windows than it does around square windows (where things can get bunched up). Aeroplane windows are also small because bigger windows congest the stress too much too. The Dreamliner can get away with having bigger windows because its composite materials are better suited to handle the stress than metal. Regular aeroplanes can't handle it and that's why their windows are so small.
But for a deeper dive on the difference, watch this video by Real Engineering below.