As blockchain uses the public key to verify the signature how it would know if I signed with the correct private key?
For every 257-bit public key, there is only one valid 256-bit private key. For 160-bit hash of some 257-bit public key, there are potentially a lot of valid public keys, but as long as hash functions are safe, nobody knows, how to produce those preimages.
but how the nodes know if the priv key was the correct?
A signature is a combination of public key addition and multiplication. If you have two valid secp256k1 points, then you have to demonstrate a way, to get from one point to another. The first point is your public key. The second one is your "signature public key", called also "signature nonce", which should be random, and generated every time you want to sign something.
So, you have two public keys: one from your coin, and one from your signature. If you can connect them with addition and multiplication, and if numbers behind it, can match transaction hash, then that signature is valid.
Still not clear on my cognition, but I understand the concept.
Some explanation on smaller numbers:
https://www.coindesk.com/markets/2014/10/19/the-math-behind-the-bitcoin-protocol/but I still dont see how it can not be attacked by fake priv key mix
1. If you have public key in your output script, then it cannot, because then there is only one matching 256-bit private key, for each and every 257-bit public key.
2. If you have any hash of your public key, then it is safe, as long as that hash function is safe. But yes, in this case, it is possible to use a different key, but nobody knows, how to do that.
I still think there is ways to attack it
Of course there are ways to attack. But they are non-standard, or as hard as breaking a given private key, so we are safe, as long as someone will not invent some better attack (but then, it is possible to upgrade the network into some other, not-yet-broken algorithm).
For example: nobody knows the private key to this public key, but it was spent on testnet3, because of SIGHASH_SINGLE bug:
https://mempool.space/testnet/address/032baf163f5e27261ab3228e61fb86dc98054abd514751fce93d7444e8fbc6a293