Warforged Ahead
What are constructs?
Constructs are creatures that are artificially created or that are born from the animation of inanimate objects such as a weapon or a pile of rocks. Constructs don’t include creatures created by animating beings that have died (such as bones or corpses) as these are considered to be undead.
There are many constructs and they are created for a variety of purposes, but usually, it requires very powerful magic. This means that usually, it’s only powerful magic users that’re able to bring such beings to life.
About constructs
Not all constructs are created equally. Some may be programmed to follow basic instructions, more akin to machinery than a living being, of course, those instructions may resemble the semblance of intelligence such as an instruction to guard a location from intruders or to keep a certain location clean. Other constructs are imbued with intelligence and an ability to think for themselves and are even self-conscious enough to think like other living creatures.
Autognomes, for example, are capable of intellectual thought. Some even break away from their programming (either on their own or due to circumstances) to become independent thinking people. It’s difficult to know whether some of these creatures truly have independent thought, or if their programming was just broad enough to allow them to mimic humanoid personalities.
While there are many different types of constructs with very different capabilities, the main common theme between all constructs is that they are not born, but are made from inorganic material.
Because of this, constructs usually have immunities to certain common conditions such as poison, paralysis, psychic damage, exhaustion and charm spells. The simple reason for this is that as inorganic beings, they do not have an immune system to poison, do not get tired and their minds don’t operate in the same way to be affected by such magic. They also aren’t affected by certain healing spells with the exception of aid and regeneration spells (though some exceptions do exist, like for Autognomes, who can be healed through the usual methods).
Types of Constructs
Below, we’ve listed out all the main types of constructs for D&D 5e found in the Monster Manual and Monsters of the Multiverse. One interesting exclusion are Warforged who are classified as humanoids, despite their creation being akin to that of a construct, were not classified as such. I suspect this is more to ensure that mechanically, the things that affect most PCs, would still affect a Warforged.
Atognomes are similar to Warforged but have been classified as constructs. I suspect the designers simply took a different approach to designing them and simply baked in exceptions to allow Autognomes to be healed like a humanoid might. Either way, I’d say that although a Warforged should be treated mechanically as a humanoid, in personality and other ways, it should be treated as a construct.

Animated Armor
CR 1
Suits of armor that have been magically animated to follow simple instructions and functions like to guard an entrance.

Autognome
CR N/A
Built by Rock Gnomes, Autognomes are mechanical beings given sentience. While they tend to roughly resemble gnomes, each Autognome is distinct, created after a fashion and using technology imagined by their creator. Autognomes are also a playable race.

Cadaver Collector
CR 14
Massive constructs tasked with collecting the corpses of those that have fallen on a battlefield.

Clockwork Creatures
CR 1-5
There are many types of clockwork creatures, but they’re usually built by rock gnomes to protect their lands.
Subraces: clockwork bronze scout, clockwork iron cobra, clockwork oaken bolter, clockwork stone defender

Duergar Hammerer
CR 2
A metal box containing a living Duergar that is tortured by the mechanisms within the Hammerer. The living Duergar’s pain is used to fuel the functions of the Hammerer, allowing it to attack and dig tunnels.

Duergar Screamer
CR 3
Similar to the Duergar Hammerer, the Screamer traps a living Duergar within its shell and tortures them, using their pain to fuel its equipment. The Screamer will use sonic tools to drill through rocks and the ven enemies.

Golems
CR 5-16
Golems are magically created from a variety of materials such as iron, clay and stone. They will follow the orders of their creator to the letter.
Subraces: clay golem, flesh golem, iron golem, stone golem

Flying Sword
CR 1/4
A magically animated sword that can fly and follow simple instructions and functions.

Hellfire Engine
CR 16
Enormous, living machines created by Devils to kill large numbers of creatures at a time.

Helmed Horror
CR 4
Created from a suit of armour, helmed horrors are usually used as guardians.

Homunculus
CR 0
A miniature servant created by a wizard as a companion and a spy.

Marut
CR 25
A huge construct made from onyx and gold with winged limbs. They’re used in the city of Sigil to enforce contracts.

Modron
CR 1/8-2
An immortal race that adheres to the concepts of law and order above all else.
Subraces: monodrone, duodrone, tridrone, quadrone, pentadrone

Retriever
CR 14
Metallic beings with the appearance of a spider. Retrievers are created by Demons to collect victims for them.

Rug of Smothering
CR 2
A magical rug that can fly. It can use its malleable form to smother enemies, preventing them from breathing.

Sacred Statue
CR N/A
Constructs created from the souls of devoted adherents to protect sacred sites.

Scarecrow
CR 1
Scarecrows animated by the bound spirit of an evil creature like a demon or devil. Scarecrows are often created by witches and hags to protect their coven.

Shield Guardian
CR 7
Large, metallic constructs created by Spellcasters to provide protection to their masters.

Steel Predator
CR 16
Looking like large cats, these creatures like to consume metal, especially magically enchanted equipment.

Stone Cursed
CR 1
Mindless and malevolent creatures that were once humanoids that had been petrified and subsequently animated by a spellcaster to kill.
Using constructs in your campaign
At a basic level, constructs make great guards and footsoldiers. They have unique abilities and can throw off a party that might need to use certain tactics to deal with one monster type while trying to handle constructs at the same time.
Thematically, they make sense serving powerful wizards, but others might acquire or use a construct. Rock Gnomes create Autognomes, Duergar use Screamers and Hammerers, the inhabitants of Eberron used many constructs in their wars and hags like to use scarecrows.
I reality, you could insert a construct into many encounters. A construct might have been commissioned or gifted by a wizard, or perhaps an used construct was taken in by someone that found them abandoned.
While these may be typical ways to include constructs in a campaign, a more interesting way to use them could be as they’re gaining some form of sentience. You could consider using constructs that have decided Humanoids are a blight on the planet and must be destroyed. Or perhaps constructs that resent their enforced enslavement and are rising against their masters. A quirky NPC construct might act differently than expected as it seeks to make sense of the emotions and feelings of the organic beings. Some constructs might seek to emulate humanoids (however they view them) in an effort to become real people.
Teres a real variety to how constructs can be used, and when you break from the norm of how they operate, this is when they become the most interesting.