Yes this is true that Software engineers relatively get pay well not because they learn everything from internet. Its not about only learning but its also about what extra you have developed after learning those. And yes not every engineer get good salary, some exceptions are there.
Resource is not everything, yes that can be a start but continuing with the work on that will make a bit different from others, and at that point based on your performance your salary will be negotiable. So work hard to get pay well.