There is a possibility using a "Virtual Layer" through
Layer > Add Layer > Add/Edit Virtual Layer...
Let's assume we have eight features in
'school' (blue squares) and five in
'tower' (orange circles) accordingly, see image below.
With the following Query, it is possible to draw lines between the pairs of points.
SELECT s.Name AS SName, t.Name AS TName,
ROUND(MIN(ST_Distance(s.geometry, t.geometry)),2) AS distance,
s.id || '_' || t.id AS uniqueid
FROM school AS s, tower AS t
GROUP BY s.Name
ORDER BY distance DESC
The output Virtual Layer will generate shortest lines between schools and towers including the following attributes
"closest tower name",
"distance to the closest tower" and