Tawassul means to pray by putting forward something that is pleasing to Allah. That is, to pray by putting forward Allah's attributes, or good deeds that He loves, or great personalities whom Allah loves, such as Anbiya, Awliya, and Salihin.
Imam Baydawi (﵀) says:
تقْدِيمَ الوَسِيلَةِ عَلَى طَلَبِ الحَاجَةِ أَدْعَى إِلَى الاجابة (بيضاوى)
Presenting a Wasilah (means/intermediary) at the time of seeking needs is most conducive to the acceptance of the prayer (Baydawi).
Allah says:
ياايها الذينَ آمَنُوا اتَّقُوا اللَّهَ وَابْتَغُوا إِلَيْهِ الوَسِيلَةَ (مائدة ٣٥)
O you who have believed, fear Allah and seek the Wasilah (means of approach) to Him. (Surah Al-Ma'idah, 5:35)
Therefore, praying by putting forward Anbiya, Awliya, and others is a virtuous act and is established by authentic Hadiths. The incident of Prophet Adam (﵇) making Tawassul through the Prophet Muhammad (ﷺ) who was yet to come is a refutation of the Bid'i (innovator's) claim that Tawassul can only be made through a living person and not through those who have passed away.
عَنْ عُمَرَ رَضِي اللَّهُ عَنْهُ قَالَ: قَالَ رَسُو الله (ص) لَمَّا اقْتَرَفَ آدَمُ الخَطِيئَةَ قَالَ: يَا رَبِّ اسْؤلْكَ بِحَقِّ مُحَمَّدٍ لِمَا غَفَرْتَ لِي فَقَالَ اللَّهِ صَدَقْتَ يَا آدَمُ انَّهُ لَاحُبُّ الخَلْقِ إِلَيَّ أَدْعُنِي بِحَقِّهِ فَقَدْ غَفَرْتُ لَكَ وَلَوْلا مُحَمَّدٌ مَا خَلَقْتُكَ (الْمُسْتَدْرَكَ ٢ / ٢١٥)
Umar (﵁) reported: The Messenger of Allah (ﷺ) said: When Adam (﵇) committed the mistake (was expelled from Paradise), he sought intercession through the right/status (Haqq) of the Prophet Muhammad (ﷺ) for his repentance to be accepted. Allah said: Muhammad (ﷺ) is the most beloved of creation to Me. You prayed through his right/status (Haqq), therefore I have forgiven you. (Mustadrak 2/615).
It is seen in another Hadith:
عن انَسِ بْنِ مَالِكِ (ر) أَنْ عُمَرَ بْنَ الْخَطَّابِ (ر) كَانَ إِذَا قطوا اسْتَسْقَى بِالْعَبَّاسِ بْنِ عَبْدِ الْمُطَّلِبَ (ر) فَقَالَ اللهُمَّ إِنَّا كُنَّا نَتَوَسَّلُ إِلَيْكَ بِنَبِيِّنَا (ص) فَتَسَقِينَا وَإِنَّا نتوسلُ أَلَيْكَ بِعَمْ نَبِيِّنَا (ص) فَاسْقِنَا قَالَ فَيُسْقَوْنَ (بخاری)
When Umar (﵁) faced a drought, he made Tawassul through Abbas (﵁) and prayed thus: "O Allah, we used to make Tawassul to You through our Prophet (ﷺ), and You would give us rain. Now, we make Tawassul to You through the paternal uncle of our Prophet (ﷺ), so give us rain." Then they were given rain. (Bukhari)
This Hadith is a decisive blow (lit. axe to the neck) to the deniers of Tawassul. This Tawassul, which all the Sahabah accepted, is sometimes misinterpreted by them as Umar (﵁) asking Abbas (﵁) to pray. However, here the one making du'a (supplication) is Umar (﵁), not Abbas (﵁). Umar (﵁) is not only making Tawassul through Abbas (﵁) here. Rather, he said, "We make Tawassul through the paternal uncle of our Prophet (ﷺ)." So, the Prophet (ﷺ) who had passed away is primarily considered in the Tawassul. There are many such Hadiths as evidence for Tawassul. To make Tawassul Shirk is like making the Prophet (ﷺ) and the Sahabah Mushriks (polytheists).