How to get customer data by customer email in magento 2?

You can get customer information by just passing customer email using below code snippet, Create Block file,

<?php

namespace Rbj\Customer\Block;

class Customer extends \Magento\Framework\View\Element\Template
{
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository,
        array $data = []
    ) {
        $this->customerRepository = $customerRepository;
        parent::__construct($context, $data);
    }
    /*
    * $email string
    * $websiteId int
    */
    public function getCustomerByEmail($email,$websiteId = null)
    {
        return $this->customerRepository->get($email,$websiteId);
    }

Call getCustomerByEmail() function in template file,

$customerEmail = 'roni_cost@example.com';
$websiteId = 1; // pass website id
$customer = $block->getCustomerByEmail($customerEmail,$websiteId);
echo $customer->getFirstname();
echo $customer->getEmail();
echo $customer->getLastname();

Get all customer data by below way,
echo “<pre>”;print_r($customer->__toArray());

For, Get customer data by customer id using below link, https://www.rakeshjesadiya.com/how-to-get-customer-data-by-customer-id-magento-2/