I will re post here a post I did in the past.
If one engages with full knowledge and complete consent in lustful thoughts or seeks to arouse oneself deliberately or consents to sexual pleasure-- that sort of thing is grave matter.
But just to notice an attractive person - even if one deliberately notices again is not per se lust.
Catechism: 2351 Lust is disordered desire for or inordinate enjoyment of sexual pleasure. Sexual pleasure is morally disordered when sought for itself, isolated from its procreative and unitive purposes. scborromeo.org/ccc/ccc_toc.htm
Jimmy Akin senior apologist at Catholic Answers:
You have heard that it was said, `You shall not commit adultery.’ But I say to you that every one who looks at a woman lustfully has already committed adultery with her in his heart [Matt. 5:27-28].
Translated a bit more literally, he singled out those who look at a woman “to lust after her.” (i.e., purposefully looking at her in order to incite lustful fantasies, not just looking at her and feeling attraction.)"
Dr. Peter Kreeft - famous quite orthodox Catholic Philosopher:
"Most people misunderstand the meaning of the word lust. They think it simply means strong sexual desire, or passion. And since that is natural and normal, they think Christianity teaches that something natural and normal is sinful.
But lust does not mean simply sexual desire, but deliberately inflaming your sexual desire for a woman or man who is not your wife or husband, or deliberately planning co commit adultery with them…
We are justly praised or blamed only for the good or evil things we freely choose, not for feelings and instincts that arise without our free choice. For instance, when you see a very attractive person of the opposite sex, your head naturally turns and your heart beats fast. That is not lust. But if you start to command your mind to fantasize about what it would feel like to go to bed with that person, that is lust."
From pg 95-96 “Your Questions God’s Answers” Ignatius Press.
Yes - men commit mortal sins by looking lustfully at women. Yes that happens. Such is a mortal sin (grave matter - and mortal sin if done with full knowledge and deliberate consent).
One can yes sin mortally (gravely -same thing) interiorly and even in looking at a person -but that is when there is lust. Sexual attraction is not per se lust.
Giving with full knowledge - complete consent to sexual thoughts and desires. That is lust. Seeking or consenting to sexual pleasure outside of marriage - that is lust.
A good regular confessor can help you work on these things.
If one sees an attractive girl - remember first she is a person - “wow she is beautiful” Or “she is attractive” or “Praise God for all beauty” …and generally - keep walking.
There can be various degrees of danger (temptation) present.
And one needs a reasonable custodia occculorum (custody of the eyes). Is important. But it needs to be a reasonable and prudent exercise. Like looking calmly away from persons who are rather immodestly dressed etc. Such is particularly important at in places like the beach ( and yes do not stare at women in bikini’s that can yes lead to lust). But I mean calmly…without stress without undue fear. One can be quick and calm at the same time. It is important yes to know yourself and know how to look away. And it is important not to confuse simple attraction with the grave sin of lust.
This is a somewhat difficult area - so a good confessor can assist.