How do i call a function from another script in another object

I got to scripts that are in two different objects. I need script ‘A’ to call a function in script ‘B’. and script ‘B’ is in a different game object,
How do I do this?

This is asked WAY to often to not try and search for the answer yourself.

From unity docs:

From unity forums:

From unity answers:

From YouTube:

and on and on and on.