You’ve made so many posts and dug yourself into increasingly deeper holes, but I really think your original problem is the one discussed a couple of times a week here.
But if you’re on Arduino 3.anything, you’re not using Platformio; You’re using PIOArduino.
But if you specify a flash speed that doesn’t match or a partition size that’s too large—especially when you’ve maimed serial debug output - you’re in for a bad day.
Take the time to configure and learn to use a debugger.