If your filling or tooth has any rough edges, it can cause trauma to your buccal mucosa leading to that ulcer. The ulcer won't heal until the source of trauma isn't removed. So please visit a dentist and get it smoothened or replace the filling with a new one. Then the ulcer will heal on its own.
Next Steps
visit a dentist soon!
Health Tips
avoid hot and spicy food for a few days until the filling is taken care of.