you have several ways to calculate the correlation between a raster and points, or between two aligned rasters.
You can use Grass or SAGA tools, or do it by programming.
Areas with no yield value should not be a problem, since the correlation is done with point-to-pixel matching.
I recommend SAGA, it is very easy, direct and you can evaluate several adjustment equations.
SAGA is installed together with QGIS, run it.
On File > Open search and load your layers
In the data tab you will see both the raster and the point layer. Select the Raster (TWI in your case) and right click, in the drop down menu select scatterplot.
In the options, in
compare with... change to points. At the bottom, in
points select the layer of points and finally in
attributes the field with the yield value. Click
It shows you a result like the one in the image, the graph, the r2 value and the adjustment equation
At the top you can see some buttons, the first one allows you to alter the properties, including the adjustment equation. Remember, you can have a different fit than linear, for example exponential, logarithmic.
The second is to update if any of the layers have changed.
The THIRD converts the graph to a table, note in the image as it shows only the points from which I extracted the pixel values, I can take this table to a spreadsheet.