I'm using $query->created_at->diffForHumans(now()) to try to get it to show me for example "1 day ago" but the result it gives me is "1 day before" and I tried to change the language but they tell me nothing the same in English for example 1 day before what could it be due to and how can I change it?
What happens is that you are comparing two values (when you pass a date in the first parameter, it is considered a value, regardless of whether it is the current date).
If you want it to appear: X time ago, you should not pass any parameter, since the default value in the comparison is the current date and time (now).