This is what the catechism says about mortal sin:
[quote=]1857 For a sin to be mortal, three conditions must together be met: "Mortal sin is sin whose object is grave matter and which is also committed with full knowledge and deliberate consent."131
1858 Grave matter is specified by the Ten Commandments, corresponding to the answer of Jesus to the rich young man: "Do not kill, Do not commit adultery, Do not steal, Do not bear false witness, Do not defraud, Honor your father and your mother."132 The gravity of sins is more or less great: murder is graver than theft. One must also take into account who is wronged: violence against parents is in itself graver than violence against a stranger.
1859 Mortal sin requires full knowledge and complete consent. It presupposes knowledge of the sinful character of the act, of its opposition to God’s law. It also implies a consent sufficiently deliberate to be a personal choice. Feigned ignorance and hardness of heart133 do not diminish, but rather increase, the voluntary character of a sin.
If you’re unsure about a particular sin’s gravity, you can always look it up in the catechism and see what is written about it. For example, the Catechism tells us that using contraception is “intrinsically evil.” So that particular sin meets the definition for grave matter and if chosen with full knowledge and complete consent, it would also be mortal.
Consent means you choose it, and you’re not being forced to do so or choosing to do it against your will. So, for example, abortion is gravely wrong, but if a parent brings their minor daughter in for an abortion and threatens to kick her out of the house if she doesn’t go through it it, then she’s not freely consenting to the sin of abortion.
Full knowledge means you know what you’re about to do offends God and you do it anyway. Young children below the age of reason can do all sorts of freely chosen, grave acts (disobeying parents, biting siblings, etc) but they do so without realizing that these actions offend God (and, moreover, they often lack the impulse control to be able to say the acts were freely chosen).
In your case, follow the advice of your confessor. If he tells you a particular sin is not mortal, don’t rush back to confession if you commit it again that week. But if you know something is gravely wrong and you choose to do it anyway, it’s probably mortal.