If you treat it as cost, it will be a cost.
Just an expense. Spent.
If you treat it as an investment, you will want a return from it.
You will want to pass your exams. You will want a better job and/or a pay rise.
Stick that goal on the wall, where you can see it every day, driving you forward, focussed.
And don’t forget that for any course that you buy, you are buying training. You are not buying an instant qualification. You are not buying a bundle of learning implanted in your brain. Trainers and teachers can’t take the exams for you. They are there to help you learn, to provide learning support. The key word is “learn”. You are the one that has to do the learning. No-one else can do that for you. They can only help you, nag you, support you, explain things to you, show you, advise you, counsel you. They can’t learn for you.
Your course fee is only part of your investment, or hopefully your employer’s investment.
An even bigger, and more important, investment is your time. Your willingness to learn.
If you don’t invest this, then don’t expect a return on your investment.
You don’t invest in a car and then refuse to invest in any petrol.
If you invest in a course, make sure you invest your time and commitment.
Then, and only then, can you expect to get that return on your investment and achieve your goals.