Normally, enabling the keepInventory game rule in a new Minecraft world requires either digging through the Game Rules menu during world creation or turning on cheats to type a manual command. The Keep Inventory Always Data Pack removes those extra steps by setting the rule to active right away.
Adding the Pack During World Creation
Because data packs in vanilla Minecraft are applied on a per-world basis during setup, you need to load the pack before generating your terrain:
1. From the main menu, click Singleplayer and then Create New World.
2. Navigate to the More tab at the top of the screen and select Data Packs.
3. Drag and drop the Keep Inventory Always Data Pack file into the game window, or select it from the Available column if it is already in your folder.
4. Click the arrow on the pack's icon to move it over to the Selected column.
5. Click Done, adjust any other world preferences you want, and press Create New World.
How It Works in Your World
Once you spawn into your freshly created survival world, the keepInventory game rule is turned on automatically. You do not need to open the chat window or run /gamerule keepInventory true yourself. This also means you can play with cheats disabled while still keeping all of your gear whenever you die.