As mentioned earlier, you need to keep one block around the panda in Java Editon and eight blocks in Bedrock Edition when breeding. If not, your pandas won't breed.