If you're prepaid, your account number is your phone number.
If you're postpaid, your account number is on your bill in http://my.t-mobile.com
If you don't recall your PIN, you're going to have to call T-Mobile to get it reset. You might be able to do it via the chat in the T-Mobile app, I'm not certain. I just know I had to call on Friday to get a few things done and they had to reset my PIN for me when I called because I'm an idiot and had forgotten what it was.
Manage your T-Mobile account