The Prophet ﷺ said, "Whoever cannot get an Izar, can wear trousers, and whoever cannot wear sandals can wear Khuffs (socks made from thick fabric or leather)." (Using translation from Bukhārī 5804)
قَالَ رَسُولُ اللهِ ﷺ مَنْ لَمْ يَجِدْ نَعْلَيْنِ فَلْيَلْبَسْ خُفَّيْنِ وَمَنْ لَمْ يَجِدْ إِزَارًا فَلْيَلْبَسْ سَرَاوِيلَ