This is a very weird and confusing situation. But given the circumstances, it dosen't seem like Riot has enough reasons to ban you, since you caught it early (but again, it would be very difficult not to notice this) and it was only 2 games, so Riot probably gave you the benefit of the doubt. Riot knows that a lot of their players, especially beginner players, are very inconsistent in their performance, like you can absolutely pop off one game and totally bottom-frag in the next game, and this is normal and expected. And luckily, since the account-stealer did not do anything that obviously and blatantly broke the rules, it sort of just flew under the radar.
I think you did the right thing of immediately changing your passwords after you found out, but I also recommend you use multi-factor verification (it is a pain, I know) but it would make it significantly harder for a hacker to guess your password again, since they apparently already got it the first time-somehow. Though I am not a cyber-security expert, I would also recommend you to check any other accounts for suspicous activity, especially if you use the same password for multiple accounts (I'll admit that I do that for not-super-important stuff like game accounts), as well as scanning your computer for any viruses or malware, and if you find any, to get expert help on how to properly remove all of it from your device. You are smart to not put the name or anything that identified your account on here, since it is unfortunately too easy for a person who is caught doing something bad to just claim "I was hacked", and your account might be banned or at least suspended for a while as a precaution because it has been hacked, and also sharing accounts is very much against the rules.
Also, the thing I found strange about this is why are they targeting your account in particular? What is so special about your account that warrants someone to put all this extra effort into breaking into your account and changing all the settings on it just to play a couple games of Valorant? That doesn't even make any sense - like what are their motives here? So I think it is much more likely that someone who you actually know in real life and has access to your computer saw you left your account open and seized the opportunity to do this. But of course they won't own up to it since you don't have any concrete evidence that points to them.
So what I suggest you do is to log out of everything before you go to work, since if they can physically access your Valorant account, they can mess with other stuff on your computer as well, and I also suggest you to not save any passwords of sensitive information, (even if it is convenient), and to set a password on your computer as well and lock it every day before you go to work. These steps would also help prevent unauthorized access even if you are not sure who the culprit was.
I truly hope that your account didn't get banned, and that this would never happen again. You may or may not have gotten to the bottom of this, but hey, at least you might have made some new friends with the people who suddenly appeared in your friends list, and had a laugh about this. I know that this is 1 year late, but I hope you are doing well now. 🙂