This is a macbook pro 2018. All the usb ports are working with all other peripherals and the charger works also, but sometimes it keeps turning on and off (it keeps chiming to say it's charging, randomly, every minute or so) and sometimes it charges normally.
I tried to reset SCM and NVRAM. I'm thinking that this is a big sur thing and downgrade to catalina or the adapter is malfunctioning or maybe it is a logic board thing. What do you think?