If you just want to calculate the distance from each buidling the the outline of the plots, go to the bottom to see how to calculate a new attribute field for that. Here, I first give some more detailed information and also a visualization of the line you're looking for.
Let's supposte you have three layers named:
plots (polygon) and
street (line), as in the screenshot. If you use other names, you must change the expression below accordingly.
You can now generate the red arrows as lines connecting the buildings with the boundary of the plots, using the shortest line (small dotted line in black) that connects each building with the street and than cutting this dotted line where it intersects the boundary of the plots. The part of the line that remains is connecting line you're looking for (the red double arrows in my screenshot). You can measure it's length to get the distance from the building to the plot outline:
The expression to generate this line is below. To paste it, add an additional symbol layer on the buildings layer (click the green + symbol in the Layer styling panel on the upper right side, see screenshot), set it to
Geometry generator / Geometry type: line and paste the following expression. Like this, you create lines for visualization purpose only: the red arrows in the screenshot.
To be able to measure their length, you must create actual geometries. For that, you can use the very same expression with
Menu Processing / Toolbox / Geometry by expression. Select again the buildings layer as
Input layer and set
Output geometry type to line. Than paste again the same expression as
On the screenshot above, I used the geometries created with
geometry by expression to set a label with that calculates the distance, introducing this expression:
format_number (length($geometry),2) || ' m' for the definition of the label text. You could also create the length as a new attribute, using field calculator:
You could also skip the creation of the geometry for the line you're interested in (be it for visualization only or as real geometries to get the length) and directly create a new attribute on the building layer for the length only. Click field calculator on the buildings layer to create a new field with the expression
length (expression), where instead of
expression, you should paste the whole expression from above. This returns a new field with the distance you are looking for, see screenshot for how to do it: