A simple layered structure can separate concerns.
UI ↓ Gameplay ↓ Data
Example:
InventoryUI ↓ InventoryService ↓ InventoryData
Avoid making UI directly manage files, player movement, audio and scenes all at once.