Thanks so much for sharing here on the forum!
You mentioned that you're getting mixed up where to jump in when you're playing with other guitar players. The good thing is that you're listening, and that is step one. Always listen carefully to what the other player is doing. To have a bit of trouble playing with others when you haven't played a lot in those situations before is super common, and it's just something that most people go through at first. I would recommend you to play together with recordings, and try some of your songs with a metronome and stick to it for a few weeks and you'll notice a difference. Try to play the melody only with a backing track or a metronome, and be as expressive as you can. You'll think its a bit tricky in the beginning but that's only natural and we need to keep trying. Record yourself playing with the metronome and you'll notice even more what you need to work on. You need the listeners perspective, because sometimes it's difficult to really hear how you sound when you're in the middle of playing a song. Therefore, recording yourself is essential to get better. The more yo play with other people the faster you'll learn how to do that. And for solo guitar, it's great to record and listen back a lot too!
Thanks so much for being part of the forum!
All the best/ Emil