The best advice I can give is to get more experience. As you solve more and more problems you'll find solutions that you will be able to re-apply in various situations.
I would give Codewars a go. It provides you with coding challenges that help you to improve your logical skills. codewars.com
If you find them difficult to start with, don't panic it's fine. You can look at other peoples solutions and over time you will learn the patterns to look out for and it will become muscle memory.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The best advice I can give is to get more experience. As you solve more and more problems you'll find solutions that you will be able to re-apply in various situations.
I would give Codewars a go. It provides you with coding challenges that help you to improve your logical skills. codewars.com
If you find them difficult to start with, don't panic it's fine. You can look at other peoples solutions and over time you will learn the patterns to look out for and it will become muscle memory.