There are times when you need to cut or fill an area that doesn’t consist of nice squares or rectangles. I faced such a situation when I was installing radiant floor heating in the townhome that I’m renovating. In that situation I had to create a subfloor out of puzzle pieces of OSB wood. This left some unusual spaces that needed to be filled in. The easiest way to do this was to create a cardboard template and then use that template as a pattern to cut out the OSB. See the photos below.

You can see that this space has curves and an opening for the heating duct. In addition, I had to create channels for the radiant heating tubes.
I used a piece of cardboard and a utility knife to create a template.
I used the template as a pattern for the OSB board and cut the board with a jigsaw.
A perfect fit!
You can also use self-leveling compound to fill smaller oddly-shaped areas