In molecular orbital theory, electrons in a molecule are not assigned to individual chemical bonds between atoms, but are treated as moving under the influence of the atomic nuclei in the whole molecule.Molecular orbital theory and valence bond theory are the foundational theories of quantum chemistry.For example, e.g. O2 has 6 + 6 = 12 valence electrons which can be placed in bonding and anti-bonding orbitals. Notice that Molecular Orbital Theory predicts that O2 has unpaired electrons, so it will be paramagnetic.
Hope it helps