Questions and Answers About Lent and Lenten Practices

Q. Why do we say that there are forty days of Lent? When you count all the days from Ash Wednesday through Holy Saturday, there are 46.
A. It might be more accurate to say that there is the “forty day fast within Lent.” Historically, Lent has varied from a week to three weeks to the present configuration of 46 days. The forty day fast, however, has been more stable. The Sundays of Lent are certainly part of the Time of Lent, but they are not prescribed days of fast and abstinence.
Q. So does that mean that when we give something up for Lent, such as candy, we can have it on Sundays? …

https://zenit.org/articles/questions-and-answers-about-lent-and-lenten-practices/