An object is a non-living, non-thinking thing, that can clearly be separated from its environment, has its own statistics, and lacks separate statistics for any of its vital parts.
Dungeon Master's Guide, chapter 8, Objects section, pages 246-247 gives us the majority of what we need: a definition, examples for Armor Class and Hit Points, a suggestion for fairly large things, details related to damage types, and details on Damage Thresholds.
The definition for Objects reads (emphasis mine):
For the purpose of these rules, an object is a discrete, inanimate item like a window, door, sword, book, table, chair, or stone, not a building or a vehicle that is composed of many other objects.
Discrete generally means that something is easy to identify as separate from what is around it. So this would mean that you can readily tell where the thing in question ends, and everything around it begins. An example would be individual bricks in an uncovered wall, or a wall compared to its roof.
Inanimate simply means possessing no life, but due to the sometimes fuzzy nature of that in 5e, I think it would be logical to extend this to also possessing no choice. Basically, the inability to do anything without action of an outside force.
As for examples within the definition, I chose to highlight the book, because it is an item in the Player's Handbook, and we know that it, though made of multiple parts, has statistics only for itself as a whole, even though both parchment and paper are separate items themselves. Indicating that complexity doesn't matter.
Lastly, from the definition, we are told of buildings and vehicles, but specifically that they are not objects only if they are composed of other objects. If they were always not objects, nothing would be needed after the word vehicle. We even have an example of them as objects directly for the Objects section, as a cart is listed within the Object Hit Points table, and a cart is a drawn vehicle, as shown in the table Tack, Harness, and Drawn Vehicles on page 157 of the Player's Handbook.
Further, there is a table on page 119 of the Dungeon Master's Guide called Airborne and Waterborne Vehicles which features a number of vehicles with Damage Thresholds, something listed as present on some objects. Of note, the vehicles as listed here, or in the Player's Handbook, only have statistics for themselves as a whole, not for any parts.
Finally, there are 3 examples of items that can help us narrow down what it means to be composed of other objects.
The first is the magic item Daern's Instant Fortress (Dungeon Master's Guide, page 160). When deployed, this is a building where the roof, the door, and each wall, has its own hit points. These are all vital parts of the whole, without them, the building isn't a functional building, thus it is composed of these parts. So this building is not an object itself. The parts themselves are objects.
The second is the Keelboat as listed in Ghosts of Saltmarsh (page 188). This item not only features statistics for itself as a whole, but also for each vital part of its structure: the hull, helm, oars, sails. It also lists a ballista, but that isnt vital. If any of the vital parts is destroyed, the vehicle ceases to function, thus it is composed of them. So, the keelboat, as listed in Ghosts of Saltmarsh, is not an object. But each part is.
Last is the Demon Grinder from Descent into Avernus (page 219). Like Daern's Instant Fortress and the Keelboat as listed in Ghosts of Saltmarsh, this item has parts listed. Unlike those other items however, the listed parts are not vital to the existence of this item, so their loss would not operationally destroy this item. Thus, this item is an object.
Sorry for the long-winded response, here is an easy step-by-step checker to determine if something is an object or not:
- is it alive or capable of acting independently? if so, not an object.
- is it difficult to separate from its environment? if so, not an object
- is it lacking statistics from the Dungeon Master or another source; or is clearly not intended to be interacted with? if so, not an object.
- do the vital parts of it have their own statistics? if so, not an object.
If the answer is negative to the above questions, then the item in question is an object.