Looking good is a made up standard of beauty. Being attractive is an outcome which can be reached through any abstract means which doesn't have to do with my made up standard of beauty. I don't directly know to define attraction but I do know attractive is a very open-ended adjective.
"Good looking" ( Beauty ) is a physical quality that exists irrespective of one's opinion. Attractiveness is an intangible quality that exists solely based on one's opinion. They are not mutually exclusive.
a girl can be good looking but not attractive, how? she is unhappy with her life and looks (even though many people consider her 9 on looks). she talks about depressing stuff.
an average looking girl can be attractive, how? by showing optimism, positivity, humor, seeing positive about other positivity etc. these qualities send a positive vibe to other person, which makes them enjoy time with her.