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)
عَنِ النَّبِيِّ ﷺ قَالَ «مَنْ لَمْ يَجِدْ إِزَارًا فَلْيَلْبَسْ سَرَاوِيلَ وَمَنْ لَمْ يَجِدْ نَعْلَيْنِ فَلْيَلْبَسْ خُفَّيْنِ»