Why this didn’t work if i use get_the_ID(), but works if i pass the numeric id

Why this didn’t work if i use get_the_ID(), but works if i pass the numeric id

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