If i can generate a wallet and corresponding private key offline, and those can fit in the blockchain when I go online
Well, they don't 'fit in the blockchain'. But they are valid, of course.
does it mean that there is a certain formula between a wallet and the private key?
A 'wallet' is a piece of software which manages your public-/private keypairs.
Most wallets use a 24 word seed to derive those keypairs (together with a counter for an (almost) infinite amount).
Can people use that formula to get my private key simply knowing my wallet address?
From knowing one of your wallets
addresses (public keys; technically addresses don't exist, they are used for 'represantation') noone can calculate/crack/hack/etc.. your private key.
Thats the sense of a trustless secured system.