While you're struggling with getting a freaking checkbox work correctly in your HTML for hours?
Either
1. People exaggerate a lot 2. There is some difference between who can work productively and do things fast (and also with good quality, I don't take into account rubbish code) and who spend much more time.
But I cannot get it. I'm the same programmer, as many, and I've built a lot of apps in my life. But it looks like it takes much more time for me.
Imposter syndrome? People exaggerating? Or maybe some focus, concentration techniques used by others? ADHD?
Sure some people can hyperfocus (ADHD, ..) but most people cannot.
Building a landing page isn't the hard part. There are plenty of tools for that as well as for image/graphics generation. These people often have used them a lot already so they know their way around them.
The hard part is figuring out the content, the problem you are solving and who you solve it for. This often isn't done before and these landing pages become part of a portfolio and that's it.
i.e. they never said they spent a couple of hours doing it from 0.
It's also possible they purchased a template of some sort and just modified it.
There was one day I felt like I was struggling to do very simple things, but then when we had a status meeting and wrote a paragraph about what I did that week and I seemed like an action hero out of a movie.
You just need to keep doing stuff. There is so much to learn in development, and you probably will never stop learning, but you do accumulate enough knowledge that things start getting easier.
There's also a famous phrase for fitness coaches: "it doesn't get easier, you just get tougher". I think that's probably also true for a lot of software (which contradicts my last paragraph but I think you get the point). That being said, leverage things to make your life easier. Strike a balance between dependency hell and rolling your own to make your life easier. The easiest one for this is evaluating whether spending the time to get your design pixel perfect is worth it compared to "near enough", especially if it's just a hobbyist site. This kind of thing comes down to your personal tolerance for imperfection. The people knocking things up in a couple of hours probably have a higher tolerance for imperfection. They can ship things unfinished and then keep iterating to improve over time. They're probably not too fussed about a bit of text being unaligned or the odd link not working properly. If you need everything to be perfect before you ship you're probably in for a rougher time of it.
Everything comes down to tradeoffs at the end of the day, the most famous being the speed - scope - cost project management triangle: https://en.wikipedia.org/wiki/Project_management_triangle
I don't think there is really any magic solution to make you 10x. You're better off taking a Dave Brailsford marginal gains approach. 1% improvement a week is 100% improvement over two years: https://jamesclear.com/marginal-gains