Tackling a steep climb is a great way to train and many new riders say they want to get better at climbing (well, as do most experienced riders).
They key is to pace you effort across the climb and not to put in a really hard effort at the start then burn out.
Switch down the gears until you can maintain a cadence around 70-80 for most of the climb. If you go off too hard at the start, you are likely to find yourself in too high gear, and that will slow you down and sap energy.
Use Strava to monitor your performance on the hill over time. Whilst you may not be close to getting the KOM, it will give you any indicator of how well your training is going and motivation to set a PR. It won’t get any easier, you’ll just go faster