I only have to “quotes” strings that contains globs. The rest mostly work or use the newer/recommanded way to do things for posix shells.
But I must admit, I only use it interactively. For scripts I . I will use something else once it won some/most the distro preinstalls (either nu, elvish, fish, but for now it’s sadly python).
Most of the time the fix is: put quotes around your strings (especially when they may contains globing patterns). Sometimes its using newer syntax available in bash but not on the snippet.