Show form per shortcode

Use add_shortcode in your plugin or theme or, if you don’t want to add a plugin or modify the theme, use Code Snippets plugin. Your code will look like this:

add_shortcode( "your-awesome-unique-shortcode", "wpse376442_your_awesome_shortcode_callback");

function wpse376442_your_awesome_shortcode_callback($atts, $content, $shortcode_tag) {
    $user_id = get_current_user_id();
    $balance = mycred_get_users_balance( $user_id );
    $echo = "Current Balance: ".$balance."<br><br>";
    if ($_POST && $_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['amount'])){
        $towithdraw = $_POST['amount'];
            $towithdraws = "-".$towithdraw;
            if ($towithdraw > $balance){
                $echo = "Insufficient Funds!";
        }else{
            mycred_subtract( 'Withdrawal', $user_id, $towithdraws, 'Activity earnings withdrawal' );
    
            $uname = $_POST['uname'];
            $fname = $_POST['fname'];
            $lname = $_POST['lname'];
            $email = $_POST['email'];
            $amount = $_POST['amount'];
            $acct = $_POST['acct'];
            $link = $_POST['link'];
            
            $name = $fname.lname;
            
            
            $message = $_POST['message'];
            $formcontent=" From: $name \n Username: $uname \n Email Address: $email \n Amount: $amount \n  Facebook link: $link \n Account details: $acct \n";
            $recipient = "[email protected]";
            $subject = "Withdrawal Form";
            $mailheader = "From: $email \r\n";
            
            wp_mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
            
            $echo = "Your withdrawal request has been submitted successfully and you have been debited instantly, please kindly wait for moderation";
                
      
        }
    }else {
    
        $echo = '<form method="POST" action="https://plantfunds.com/withdrawal/">
                    <label for="uname">Username:</label><br>
                    <input type="text" id="uname" name="uname" required=" "><br>
    
                <label for="fname">First name:</label><br>
                    <input type="text" id="fname" name="fname" required=" "><br>
    
                <label for="lname">Last name:</label><br>
                    <input type="text" id="lname" name="lname" required=" "><br>
    
                <label for="email">Email address:</label><br>
                    <input type="email" id="email" name="email" required=" "><br>
    
                <label for="acct">Bank Details:</label><br>
                    <textarea id="email" name="acct" required=" "> </textarea>  <br>
    
    
                    <label for="amount">Amount to withdraw:</label><br>
                    <input type="number" id="amount" name="amount" value="amount" required=" "><br><br>
    
                <label for="link">Facebook link:</label><br>
    
                <input type="url" id="link" name="link" required=" "><br><br>
                    <input type="submit" value="Submit Request">
                </form>';
    }
    return $echo;
}

Note that I converted the echo’s to strings and returned them. As the reference says:

Note that the function called by the shortcode should never produce an
output of any kind. Shortcode functions should return the text that is
to be used to replace the shortcode. Producing the output directly
will lead to unexpected results.