It is a pity Apple doesn't include this feature in MacOS, however there's a way to workaround it.
What you need is called Rectangle
- It allows you to drag windows to the side of the screen to snap on it.
- It also comes with lots of keyboard shortcuts you can use and change to your preference.
Download And Install From Their Official Website, it’s free.
You can also check out their repo on github (open source).
Cheers