How can I prevent a function from loading in the admin screens?

You can use the is_admin() function to check:

add_action( 'init', 'hekim_sticky_header' );
function hekim_sticky_header() {
    if ( is_admin() ) {
        return;
    }
    // Rest of your function goes here.
}

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