I use the command line tool arduino-cli (with plain Makefile) to compile and upload the code (obviously usable in any editor). It has also a --verbose mode to show exactly what is getting executed. But I heard a lot about platformio, so I am wondering what is its benefits (beside the integration in vscode; as an emacs user vscode is not working for me)
I think platformio's selling point is multiple target boards via ts config. That and you can use an actual editor instead of the arduino "IDE", although I'm not a fan of vscode anymore either.
I also think they have some testing features built in, though i never delved too deep.