Answer: The Mishna (Berachos 9:2) writes that one recites the beracha shehecheyanu upon building a new house or buying new items. The Shulchan Aruch (OC 223:3) adds that this applies equally to buying an old house. The Mishna Berura (223:11) notes that when one is buying a family home that will benefit multiple people, one says hatov vehametiv instead.
The Sheiltos (1:1) mentions that there is also an ancient minhag to invite others to a party when completing a house. The Magen Avraham (568:5) writes that it is only considered to be a seudas mitzva if one buys a home in Eretz Yisrael. He quotes the Maharshal (Yam Shel Shlomo, Bava Kama 7:37) who writes that for such a party in chutz la’aretz to be considered a seudas mitzva, one must ensure that they share divrei Torah there (See Kaf Hachaim OC 223:19; 568:25).
R’ Malkiel Tannenbaum (Divrei Malkiel 1:3:8; 4:8) disagrees, however, writing that the Sheiltos and other early sources do not differentiate between buying a new house in Eretz Yisrael or in chutz la’aretz, and a party celebrating a new house would be considered a seudas mitzva regardless.
R’ Ephraim of Luntschitz (Ollelos Ephraim 2:107) writes that as the sefira is such an overwhelming time, one should avoid saying shehecheyanu during this period. The Mishna Berura (493:2) writes that while one shouldn’t increase one’s simcha during the sefira, one should say shehecheyanu if the opportunity arises.
R’ Ovadia Yosef (Yechave Daas 1:24) and R’ Ephraim Greenblatt (Rivevos Ephraim 1:227) however, disagree, writing that the sefira is markedly different to the three weeks which is a time of mourning for the churban. The sefira is certainly an auspicious time, though not a sad one. One may, therefore, recite shehecheyanu then. R’ Ovadia concedes, however, that one shouldn’t look for such opportunities. Thus it is ideal to wait for Shabbos or until after the sefira to wear new clothes.
The Piskei Teshuvos (493:1) quotes both opinions and writes that ideally one should avoid moving into a new house during this time.
In conclusion, while one may say shehecheyanu during the sefira, one should ideally wait until lag b’omer to make a chanukas habayis.