'Calculate distance between current digitized point and closest existing point in QGIS field calculator

I'm more or less a beginner with QGIS, I'am currently using QGIS 3.16 version. I would like to calculate distances (in meters) of all existing points in a certain layer to their respective nearest neighbor points. This exercice is meant to work on a "apply default value on update" manner so that i can determine during digitizing process if any point digitized is too far away from its nearest neighbor. Is it possible to do this with the QGIS field calculator? The points are geometry points with latitude and longitude in ETRS89 PT TM06. The attribute table has a field named "DISTANCE" (Distance to nearest tower (point/feature)) which is meant to be autofilled with the said distances during digitizing process. Sorry if it seems too random of a question or even too inefficient of a method but all help and shared thoughts will be more than appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source