Thanks for posting your query
You had an injury
over your upper shin & swelling occurs after that.
It may be a soft tisuse injury or a fracture
final diagnosis can be made by an x-ray.
So you have to visit an orthopaedic surgeon
for examination of knee and x-ray as needed.