Leahhh2012 Said:
"The right side of my iPhone 12 shows black squares with a greenish tint: I cant use these specific keyboard tools: sending messages and the letter P [...]its been like this for 2 months but it got worse over the months, I don’t know what to do but I wanna know what it is before I fix it so I can avoid having this problem in the future ."
-------
Troubleshooting Lines on a Screen:
For starters...
A. Take a Full Screenshot:
What do you see when you take a screenshot of your iPhone? If iCloud Photos was enabled, then view it https://www.icloud.com/photos. See if you see this in the screenshot. If so, then it is a software error. If not, then it is a hardware error.
B. Corroding Battery:
Is any side of your iPhone bulging out? If so, your battery has likely corroded, and it is time for a new iPhone.