It’s hard to guess from your question, but my impression is that you applied for a visa (twice) and were rejected (twice), and now you want to apply again for a visa.
Will they know you already applied and were refused a visa? Most certainly. And not only via your passport number (it would be to easy to suddenly “lose” your passport, get a new one, and start anew). They can use your name, date of birth and other details to get the same result. If you got to the stage where they took biometrics (fingerprints…) it’s even easier and more foolproof for them.
The only case where it could be “forgotten” is if the applications were long enough ago (at least 5 years I think, but that may vary).
Will they automatically reject a new application because the two previous ones were? No. But they will start with a pretty negative opinion, and will start looking for any possible reason to do so. So your application must be bulletproof. If your circumstances did not change much since last time, don’t waste your time and money applying again.
Remember that a visa is not a right. It’s not a matter of filling the right form with the right info and providing the requested documentation and you get approved. No. It’s more like applying for a job, or a spot in a sought after university, or seducing someone. You must prove to them you are the person they want.
Each country decides who they want to let in or not. For visitor visas, ideally they want people who will come and spend a lot of money or somehow generate money, but in any case they want to be sure you will be leaving in time, not overstay, not try to live in the country, not work in the country, not be a burden on the state, etc.
So you have to convince them that you have a valid reason to come, that you can afford it, and most importantly that you will go back home. This usually means having a good, stable, well paid job (ideally by their standards, not those of your country), or being enrolled in a course of studies, or having a pile of cash you can live on, and/or having family to take care of (though this can backfire), and/or having a place to stay, ideally owning property.
If you can’t do that, don’t bother applying, and wait until your situation changes favourably before you do. The more bad applications, the greater the chances they will just think “oh yet another bogus application from maidils, quick, let’s find any reason to reject it”.