Bearing in mind the energy and symmetry conditions, in the case of $\ce{HF}$ one can construct MOs using the $1s$ AO on H and the $2s$ and $2p$ AOs on F.
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/U5MFO.png)
In general, the contribution to MOs is determined by the coefficients in the linear combination.
Here, one observes that the $1s$ electrons are almost completely localized on the $\ce{F}$ atom. Also, $1 \pi$ electrons are completely localised on the $\ce{F}$ atom because the $2p_x$ and $2p_y$ orbitals on F have a zero net overlap with the $1s$ orbital on $\ce{H}$.
Electrons in MOs localized on a single atom are referred to as nonbonding electrons.
Also, I would note that the $3 \sigma$ MO has less bonding character and the $4 \sigma^*$ MO has less anti-bonding character.
Note that the total bond order is approximately one because the $3 \sigma$ MO is largely localized on the F atom, the $3 \sigma$ MO is not totally bonding, and the $1\pi$ MOs are completely localized on the F atom.
On account of fluorine being a more electronegative atom, in the $2 \sigma$ bonding orbital the electron density is much greater on the more electronegative fluorine than on the hydrogen. However, in the anti-bonding $4 \sigma^*$ orbital, this polarity is reversed.
Caveat: The preceding paragraph may support your intuition and may be right in a few simple cases, but I wouldn't rely on it too heavily.
Given below is a diagram showing $2 \sigma$ , $3 \sigma$ and $1 \pi$ MOs in HF
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/GFilr.png)