Warning: Cannot modify header information – headers already sent by

OK. Thanks to @Milo and @Krzysiek Dróżdż I changed the code in index.html file and it works now.

I put get_header() after redirection method.

<?php if (is_user_logged_in()): ?>
    <?php $expensesFormPage = get_page_by_title('formularz wydatkow'); ?>
    <?php wp_redirect(get_permalink($expensesFormPage->ID)); ?>
<?php else: ?>
    <?php get_header(); ?>
    <h1>Aby korzystać z aplikacji musisz się zarejestrować.</h1>
    <a href="https://wordpress.stackexchange.com/questions/307132/<?php echo wp_registration_url(); ?>">Zarejestruj się!</a>
    <?php wp_login_form(); ?>
<?php endif; ?>

<?php get_footer(); ?>