You name a pet after buying it. The naming prompt appears as part of the adoption process, so the order matters.
Head to your room and try the interaction buttons associated with the pet. In most cases the naming option surfaces there once the pet is actually in your space rather than still in the shop.
Names on virtual pet sites are frequently permanent, so decide before you type. Something short is easier to read in chat and in your friends' feeds.
If you have bought the pet and still cannot find the field anywhere, check the game's help section — naming flows have been moved around in updates more than once.