P2PK (Pay to public key) transactions were common in the early days of bitcoin.
These days, it's not common to pay bitcoin to a pubic key. If someone wants to send you bitcoin, give him/her your address.
which brings me to the question: how can I differentiate between a wallet address and a public key?
Your bitcoin address is derived from your public key.
A public keys starts with 02 or 03, if it's compressed and with 04, if it's uncompressed.
A bitcoin address starts with 1, 3 or bc1.
You might be talking about the public key with 130 characters? or xPUb?
xpub is the term used for master public key.
OP is probably talking about individual public keys. A public key includes 66 or 130 characters.
And take note if it's a 130 characters or xpub you cant send a BTC to that address you need to use or provide an address that starts with 1, 3, or bc1 if you give a different address than these then you can't be able to send or receive BTC.
Technically speaking, it's possible to pay bitcoin to public key, but as I said, that's not common these days.