Praise be to Allah.
Whoever does that must do sa‘i, because it is an essential part of ‘umrah and cannot be waived because one forgot to do it or was ignorant of it. Then after he has done sa‘i, he must shave his head or cut his hair in order to exit his ihram. The first time of shaving his head does not count, because it was done at the wrong time. Shaving the head or cutting the hair in ‘umrah can only come after doing tawaaf and sa‘i. With regard to what this person did previously, when he exited his ihram and shaved his head before doing sa‘i, he does not have to do anything, because he forgot, and the one who forgets – and, likewise, the one who is ignorant – does not have to do anything with regard to committing any of the acts that are prohibited whilst in ihram.
Shaykh Ibn ‘Uthaymeen was asked: I did ‘umrah and because I was sick I could not do sa‘i. So I did tawaaf and prayed two rak‘ahs, and I exited ihram. Is my ‘umrah valid?
He (may Allah have mercy on him) replied: This ‘umrah is not valid, because sa‘i is an essential part of ‘umrah, so it must be done.
Therefore the questioner must go now and put on the ihram garments, and do sa‘i between as-Safa and al-Marwah, and cut his hair, because the first time he cut his hair was done at the wrong time; or he may shave his head.
The individual must not do anything that will affect his act of worship until after he has asked people of knowledge, lest he do something that is a grave error without realising. Acts of worship cannot be subjected to personal whims and desires, omitting whatever one wants and limiting oneself whatever one wants.
There are no consequences that result from what the questioner did, because he was ignorant of the ruling. Even if he had had intercourse with his wife when he was ignorant of the ruling, there would be no blame on him. The same applies to all the things that are prohibited whilst in ihram: if a person does them out of ignorance, or because he forgot, or he did not do them deliberately, as in the case of one who is forced to do something, then there is no sin on him and he is not required to offer any expiation.
End quote from Majmoo‘ Fataawa Ibn ‘Uthaymeen (22/439)
And Allah knows best.