How can I get the public key?
The public key becomes known once you try to spend the output as part of the transaction spending that output. Before then only the address is known. This is one reason you should not reuse the same address twice, although a more important reason to not do that is your and others' privacy