Overview
This function stores a value in UserDefaults for the provided key, allowing data persistence between app sessions.Parameters
- Key: The string key to associate with the stored value.
- Value: The value to store (can be string, number, boolean, etc.).
Example
"john_doe" with the key "username".
