What kind of stuff have you tried to actually improve your sex life or libido?
There's so many things that can affect it, like others mentioned: your mental and physical health, meditation, age, stress levels, relationship status etc.
But at the end of the day, effort needs to be made in order to actually get you "in the mood".
Has there been effort made in making you feel desired and sexy? Do you masturbate in your free time? Do you orgasm during sex? Is sex exciting for you? Have you talked about new things to try and explore during sex?
Are you happy in your relationship? Have you been on a romantic date recently?
Are you under a lot of stress lately? Are you too tired from work/chores/responsibilities that sex feels like yet another chore? It should be exciting and something you look forward to.
Honestly, foreplay should start much earlier than right before sex. It should be something that both partners do throughout the day, such as teasing touches, some sneaky kisses, dirty texts. It should be a great build up to a point where you both desire each other so much that you can't think straight and can't keep your hands off one another.
Otherwise if you're just going straight to sex, you need at least 20-30 mins of foreplay focused on only YOU (mostly clitoral stimulation) in order for your body to be fully prepared for penetration. The vagina needs time to elongate and lubricate, you shouldn't force it. And if you experienced pain or discomfort before, your body subconsciously will also tense up the muscles there making penetration even more difficult.
I highly recommend looking into resources (articles, podcasts, videos, books etc) shared by sex therapists and other professionals about libido etc. It's something that most people experience at some point in their lives, and there's lots of tips and advice available.
For example, the book "Come as you are" is excellent at explaining how sexual desire works, how to improve your libido etc.