Sometimes, we may see an error like Installation failed: Could not create directory in WordPress while installing the plugins.
There is a possibility that the space in your hosting server is insufficient. There is likely a chance when you are using shared hosting.
Hence, make sure that you have enough space before adding content.
If the first approach does not work then you can try to create a directory manually and it should work.
If you don’t know which directory to create, you can download a plugin manually and try to upload the zip file then you may see an error along with the directory that was unable to create.
Note: Once I got the same issue and I tried the first approach but it didn’t work and after the second one, it worked.