You will need to build tailwindcss with used classes for select2, depends on how you are importing. Can you give more details?
Just created npm package for tailwindcss theme, there is also CDN option that you can use without need tailwindcss build.
Demo: https://erimicel.github.io/select2-tailwindcss-theme/
Github: https://github.com/erimicel/select2-tailwindcss-theme
You can install with:
npm install select2-tailwindcss-theme
And change select2 default theme:
$('select').select2({
theme: 'tailwindcss-3',
});