In Minecraft, items that are dropped on the ground will disappear if they are not picked up for a certain amount of time. The exact duration depends on the game version and settings:
Single-player Game: Items dropped by players or mobs in single-player mode will despawn after 5 minutes (300 seconds) without being picked up.
Multiplayer Server: On a server, the item despawn rate can be configured by the server administrators. It could be less than or more than 5 minutes, depending on the server settings.
Adventure Mode: If a player is in Adventure mode without cheats enabled, they cannot pick up items, and the items will despawn as usual.
Spectator Mode: In Spectator mode, players cannot interact with items at all, so items will also despawn.
Chunk Unloading: If an item is in a chunk that gets unloaded due to being far from the player, it may despawn.
Game Rule Changes: If the "doTileDrops" game rule is set to "false," items will not drop from blocks or entities upon destruction.
It's always a good idea to collect important items quickly to avoid losing them.