In the first template you are confusing a time duration with a moment in time. There are different things. For anything over 59 minutes this will produce wrong results.
Also, you are asking for the month %m, not the minutes %M.
As the other posted mentioned, applying the timestamp_custom() function to a difference in two times doesn’t make any sense.
You don’t even need to though, because the result of subtracting two timestamps is the number of seconds between them. To get minutes, just divide by 60.
{{ ((as_timestamp(now()) - as_timestamp(states.binary_sensor.pantry_fp2.last_changed | default(0))) / 60) | int }} minutes ago
Your | int was also positioned such that it was only affecting the timestamp for last_updated, but not the one for now(), so I changed the parentheses around as well.
Thanks for for suggestion. It works but it’s not readable atm as the result is something like 6575 minutes ago.
I think it’s better readable when you see xxx hours and xxx minutes ago…
Do you have such template?