Hi Anmol,
Regarding 1)
As a Non-EU citizen you can get a refund of the contributions taken out of your paycheck (9.3% up to the cap amount) as beppi mentioned. If 24 months have passed since you left Germany and you currently reside outside the EU, you can claim your refund.
The afore-mentioned 5 year limit is not a general rule as often misunderstood: It only applies to 9 countries (USA, India, Canada, Australia, Moldova, Philippines, South Korea, Albania, Turkey).
If you are a non-EU national of any other country in the world, there is no* limit for getting contributions refunded (even if you have already qualified for a retirement pension after the minimum of 60 monthly contributions).
*(For Brazilians, Japanese, Uruguayans, Israeli and Ex-Yugoslavian state citizens it depends where you live - in your home country you also cannot get a refund after 5 years of contributions paid, Israelis in Israel cannot get refunds in general. But the moment you live in a different non-EU country, for example in the USA, you can get your refund, no limit applies).
Regarding 2)
German retirement benefits are calculated by a simple formula: Total Earnings Points x Current Pension Value = Monthly Retirement pension.
Earnings point are given per year worked as a relation of your salary to the German average (Range is 0.1 to 2, 2 would mean you earned double than average, 0.1, you earned 10% of the average). Add all these points together over the (minimum 5 years) worked and you get your total earnings points. The current pension value in 2022 is 34,19 Euro for West Germany and 33,47 Euro for former East Germany.
To give you an example: If your gross income is 83.000 Euro per year you will collet 2 earnings points every year worked. If you leave Germany after 5 years, you have collected 10 earnings points. Once you reach the German age of retirement, you will be able to apply for a monthly retirement pension. If you were to retire in 2022 (as the current pension value is always adjusted towards inflation etc.) you would receive 10 x 34.19 Euros (if you had worked in West Germany) = 340.19 Euro BEFORE TAX.
As you are residing abroad, your German retirement pension will be fully subject to income tax. Tax will be deducted from that amount and you will receive the net amount in your bank account abroad.
(While retirement pension is taxable in Germany, a German pension refund is not taxable.)
I hope that clarifies more.