I have reproduced in my environment and got expected results as below:
Firstly, have uploaded from local using function app:
init.py:
import logging
from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient, __version__
import os
import azure.functions as func
def main(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request Rithwik.')
data = "This is Rithwik Bojja"
conname="rithcon"
constring="DefaultEndpointsProtocol=https;AccountName=rithwik;AccountKey=pPBW9jWu77Sqp5kA==;EndpointSuffix=core.windows.net"
blsc = BlobServiceClient.from_connection_string(constring)
nameblob = "rithblob"
blc = blsc.get_blob_client(container=conname, blob=nameblob)
blc.upload_blob(data, overwrite=True)
return func.HttpResponse(f"Hello, Rithwik File is Send to Blob Storage.")
Output in Local:



After Deploying to Azure and running successfully:

Output:


This is the process if you are giving connection string inside main file.
If you are providing connection string in function.json
then you need to add that connection string in Portal . You should add connection string in Configuration Section of Azure Function App(Reference for adding in Configuration section)

Then it works.
Try to follow above process and you will definitely get created blob as I got created.