Humanoid lifeforms would have to evolve from something like the tetrapod morphology found here on planet Earth. "Tetrapod" simply means four limbs. Four-limbed organisms developed from free-swimming fishes as their fins adapted to become the legs of four-legged land animals (this radically simplified a long and complex evolutionary history). Our species was derived from tetrapods who had become more or less upright with a tendency towards bipedalism.
If there are other planets where tetrapodal lifeforms have evolved it is possible once they reach a tool-making phase that they will be upright, bipedal organisms. However, they may be humanoid or resemble humans in the sense that the science-fiction author Poul Anderson suggested, and quoting Gilbert and Sullivan, "in the dusk with the light behind them". This would be due to their arising from completely ancestors as the human species.
While humans are the descendants of free-swimming bony fishes, other planets may follow other evolutionary pathways any sapient life that emerges may be completely. Had the land been colonized by benthic or bottom-dwelling organisms instead of tetrapod body plans the major animal forms might be hexapods. Though not six-limbed creatures like insects, but creatures similar to mammals or reptiles but with six legs.
If this is so, the sapients might be quadripedal hexapods (four-legged six-limbs) or bipedal hexapods (two-legs six limbs, so possibly four arms).
Also, if arthropods had developed proper lungs for their respiratory systems instead of tracheoles restricting their intake of air to diffusion through pores in their carapaces, then they could developed into large animals and not remained tiny.
These examples are based on known lifeforms on our planet. We simply don't have examples of what another biosphere might produce. Also, this discussion has been restricted to considering the progeny of Earthlike planets. Hot jupiters if they were inhabited would have radically different organism and an utterly different evolutionary history. This could produce almost anything, but it would be definitely unlike anything on Earth and most assuredly not humanoid.
The biggest unknown in this whole matter of whether extraterrestrial aliens would be humanoid or not is the way the organisms in the total ensemble of an alien biosphere would develop. There is no absolute reason that aliens would be humanoid. Certainly consideration of convergent evolution suggests that humanoid aliens could exist. But they might be only one of many body plans that are suitable for sapient organisms.
One aspect of humanoid aliens, which science-fiction often gets wrong, is if they existed it is quite likely any two humanoid aliens from different planets would be mistaken as coming from the same planet or are of the same species. Mid-twentieth century science-fiction had alien humanoids walking among us without any need for a major disguise. Many features of even humanoid aliens could be quite different. Their faces could be unlike ours. Noses and mouths might not need to be part of their breathing apparatus.
In summary, aliens are more probably different. This will be due to their different biologies and evolutionary histories. Some aliens may be humanoid, as G&S said, "in the dusk with the light behind them".