“Attitude” is something that can be controlled by the mind, your values, your teachers.
Example: “Even though she was going through a lot, she had a positive attitude.”. Her attitude was controlled by her mindset.
“Behavior” is something more unconscious, that expresses the person’s feelings and emotions.
Example: “The child’s behavior made the parents laugh.”. Here you couldn’t use “attitude”, cause the question is about a small child that expresses his/her emotions in a certain way.
I hope it helps!