If you have a Google Pixel, Motorola, or other phone that has the standard google text messages app you can go to messages.android.com<http://messages.android.com> on a computer you will need to tell the app on your phone you want to use that computer and then allow camera access to scan the QR code that’s going to show up on your screen make sure you check the box “Save this computer” so you won’t have to do it overtime you go to the site. Keep in mind there is no sound on the website so if you’re expecting a reply from the person you messaged you will need to check the site manually. If you have a LG, Samsung, or other phones consult the messages app that is used with that phone.
When it comes to viewing your text messages online, you can only review those associated with your number. As a privacy concern, you won't be able to look at messages from other numbers on your account.