I usually leave some unallocated space and then boot the installation usb. In there there's an option to manually edit the partitions and such so I just create a new ext4 partition and set it to / (which is the root directory).
If you have less than 8gb of ram then it's a good practice to leave 4gb or so to create a swap partition. You can do it at the same time you create your root partition.
If you don't want to mess with this, there's an option called "install elementary alongside of windows" that should do the same. However in the past I had issues with it so i'm not sure if it works now.