I had the same problem with tailwindcss and react native using Expo routing (2024), follow these links step by step
https://docs.expo.dev/guides/tailwind/ Helped me:
1.Install - npx expo add tailwindcss postcss autoprefixer -- --dev npx tailwindcss init -p
and then this - https://www.nativewind.dev/getting-started/expo-router Pls let me know if it works for u