Here are some of the methods I have used to generate leads online.
Blog commenting: Leaving comments on blogs on a related niche can help you generate leads. However, your comment should provide value and should not be excessively self-promotional
Facebook groups: Create your own facebook group or join facebook existing facebook groups on your niche. You can collect your potential customers' primary data from these groups and use the data to your advantage.
Events and trade shows: Events, seminars, exhibitions, trade shows etc. provide a lot of opportunities for businesses to gather data and generate leads. You can also create your own events and show.
Join the local chamber of commerce: Being a member of your local chamber of commerce can help you in numerous ways, one, you become a member of the fraternity and your interests are protected, two, you are recognized, three, you can learn from the industry experts, four, lead generations become simplified. Joining local chamber of commerce improves your credibility and visibility.
Marketing Automation: You can use automation to collect data and use the data to your advantage. You can automate social media marketing, digital marketing, etc. Automation should not always be paid, in fact, you can find a lot of free automation tools