The best way to select the right algorithm for a given problem is to understand the problem and the data you have available. You should consider the type of problem you are trying to solve (classification, regression, clustering, etc.), the size of the data, the computational resources you have available, and other factors such as the desired accuracy or speed of the algorithm.
For example, if you are trying to solve a supervised learning task such as classification or regression, you may want to consider using algorithms such as logistic regression, support vector machines, or random forests. If you have a large dataset, you may want to consider using an algorithm that can scale with the data, such as a deep learning algorithm. If you have limited computational resources, you may want to consider using an algorithm that is computationally efficient, such as a decision tree.