Your sampling method depends on who your target population is as it is important for your sample to reflect the population of interest. Probability sampling is ideal but may be expensive and/or hard to implement. Non-probability sampling from convenience samples is likely the most feasible.
Using survey panels or crowdsourced platforms are a commonly used convenience where individuals on the website will complete your survey in exchange for a monetary reward (e.g., in Canada it is common to use websites like MTurk, Prolific, Leger, Qualtrics). This may lead to the most diverse sample, data collection is quick, but may be relatively costly.
Additionally, you could use snowball sampling method which entails sending the survey to your social network and ask them to send the survey to their social network and so on an so forth. This is a cost-effective method as you can offer individuals to enter a draw for a gift card (vs. paying each respondent) but may take more time to collect data and the sample may lack diversity.
Social media is also a tool to recruit participants (e.g., Facebook, reddit). You may post your survey in groups where your population of interest may be active in. You could also pay for ads and select the demographics you'd like the ad to be shown to.
A note of caution for any of these data collection methods and sample sources - ensure you implement rigorous and multiple prevention and detection methods to detect low quality responses. Your survey may be susceptible to obtaining bot, fraudulent, and careless responses. Particularly if using social media and survey panels.
You need to specify what population you are interested in describing: e.g., the general population, a specific age group, a particular race/ethnicity, a profession, a group such as cancer survivors, or an institution such as a school or university. You also need to determine how interested you are in looking at subgroups; for example, if you wish to provide both overall statistics and look at differences by race/ethnicity, then you will probably need to oversample minority groups in order to produce reliable statistics for them.
There are also logistical considerations that may affect how you draw a sample. Often there is no list from which to draw a sample, so you may need to find creative ways to develop a list, and that may affect how you draw a sample. You say this will be an online survey; often when a list is available, it may not include email addresses or mobile phone numbers for sending links. These considerations may also affect how you draw the sample.
A simple random sample has great statistical properties, but there can be reasons for more complex sampling approaches, such as stratified samples or cluster samples,
The simplest and easiest way is to post a notice asking people to respond to the survey. That approach can provide useful information, but be aware that the people who chose to respond may be different in systematic ways from the population that you wish to describe. You may be able to at least partially correct for such bias by weighting the data to reflect the distribution in the overall population. This requires that you collect information about people's characteristics and that you know something about the distribution of those characteristics in the overall population.
Of course, everything also depends on what resources you have available, and what size of sample you wish to obtain.
If your target population is homogeneous (not classified according to specific categories), the ideal sampling method would be SRS (Simple Random Sampling), otherwise a Stratified Sampling can be used in non-homogeneous populations.
Online sample surveys are hard to use to infer to a population. The two basic methods for inference are (1) probability-of-selection-based/design-based and (2) prediction-/model-based approaches with various data collection/sampling methods. Model-assisted design-based methods are found. At any rate, for an online sample to infer to a population you would need covariate/auxiliary or predictor data. You may just have to say that you have no way to infer to a population and any usefulness from your results is speculative. However, if you want to consider inference, you might start by considering the following paper, open access through Project Euclid:
Elliott, M.R., and Valliant, R. (2017). Inference for Nonprobability Samples. Statist. Sci. 32(2): 249-264, May 2017. https://doi.org/10.1214/16-STS598 (Open Access from Project Euclid)