Is there an optimized, WordPress-y way to not call a `get_option` twice?

You’re not actually querying the database twice, if that’s what you’re worried about.

Regardless, as you’ll see from the documentation, get_option() has a second argument you can use to define a default value for if the option hasn’t been set:

$option = get_option( 'option_name', [] );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)